-
Notifications
You must be signed in to change notification settings - Fork 298
Description
📰 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:
- Environment creation
- Environment update
- Building Iris
- Installing Iris
- Uninstalling Iris
- Artificial data creation
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:
Lines 422 to 427 in 3b0ab40
| 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) |