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

Update documentation: git rev-list command with --first-parent option #956

Open kathivashkiv opened 3 years ago

kathivashkiv commented 3 years ago

Hello, I'm working on performance monitoring project for Sunpy library using ASV One of the first questions was how asv run command selects commits from a range. Current documentation says:

 The range argument to asv run specifies a range of commits that should be benchmarked. The value of this argument is passed directly to either git log or to the Mercurial log command to get the set of commits, so it actually has a very powerful syntax defined in the gitrevisions manpage, or the revsets help section for Mercurial.

But git log a..b and asv run a..b returned different commits (for example 24 and 10). It took a long time to figure out that asv run goes through git history selecting only first parents. Then I found this two commits in your repo: https://github.com/airspeed-velocity/asv/commit/5fbd3d187c0a1c164c34320ad504030206429c19 https://github.com/airspeed-velocity/asv/commit/7e866ad9e68ebabc25e8dfb17216cd3ad07b9026 So as I understand now ASV uses not git log but git rev-list with --first-parent option.

Can you please update info on your site? Cause using --first-parent option was not obvious for me, and I think that your new users may also get stuck or spend extra time trying to figure out this algorithm

kathivashkiv commented 3 years ago

I found three mentions of this command in your repo: 1) https://github.com/airspeed-velocity/asv/search?q=is+passed+directly+to+either+git+log (Benchmarking section in "Using airspeed velocity") 1) https://github.com/airspeed-velocity/asv/blob/master/asv/commands/run.py#L92 (git rev-list here, but not on the site) 2) https://github.com/airspeed-velocity/asv/blob/master/asv/commands/find.py#L44