Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickly exercise the benchmark architecture in all CI #5790

Open
trexfeathers opened this issue Feb 27, 2024 · 0 comments
Open

Quickly exercise the benchmark architecture in all CI #5790

trexfeathers opened this issue Feb 27, 2024 · 0 comments

Comments

@trexfeathers
Copy link
Contributor

馃摪 Custom Issue

#5776 introduced always benchmarking changes setup.py, not because the changes might influence performance, but because they might break the benchmarking altogether.

The smarter implementation would be to introduce another convenience to benchmarks/bm_runner.py that can go through a benchmark run without the long process of actually running the benchmarks. This could be run as part of standard CI on all pull requests to confirm that any changes have not fundamentally broken benchmarking.

Things that would need exercising:

So this basically means benchmarking two commits. ASV only works properly if running at least one benchmark, so we could perhaps introduce one to benchmarks/benchmarks/__init__ that uses artificial data generation to make a very small file then performs a very small operation in the benchmark itself.

Example command:

asv run --bench validate_bm_suite --quick <commits>

Populating <commits> would probably need similar logic to this:

with NamedTemporaryFile("w") as hashfile:
hashfile.writelines([merge_base, "\n", head_sha])
hashfile.flush()
commit_range = f"HASHFILE:{hashfile.name}"
asv_command = shlex.split(ASV_HARNESS.format(posargs=commit_range))
_subprocess_runner([*asv_command, *args.asv_args], asv=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant