airspeed-velocity / asv

Airspeed Velocity: A simple Python benchmarking tool with web-based reporting
https://asv.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
860 stars 180 forks source link

Sampling each tag in the repo #1027

Open jnoortheen opened 2 years ago

jnoortheen commented 2 years ago

Is it possible to run the benchmark for each of published tag of a repo?

Currently I am using --steps to limit the number of commits it selects. It will be better if one can run against each of the tag.

pelson commented 2 years ago

The special case code for ALL and NEW etc. is done in https://github.com/airspeed-velocity/asv/blob/b54d3024f5b77ddf81f82e5929e9b97ed85f7067/asv/commands/run.py#L235.

There is no equivalent to TAGS by the looks of it.

Given the way repos are implemented, I think it could be as simple as adding:

elif range_specs == "TAGS":
    commit_hashes = list(repo.get_tags().keys())

This is completely untested, and I have no experience of this codebase, so YMMV.