Skip to content

Commit a208c56

Browse files
pvjorisvandenbossche
authored andcommitted
DOC: contributing: fix asv usage instructions (#13794)
By default asv continuous uses head^ as the commit to compare to, whereas for PRs you usually want to compare to master.
1 parent 3fdcea6 commit a208c56

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

doc/source/contributing.rst

+14-22
Original file line numberDiff line numberDiff line change
@@ -575,42 +575,34 @@ To install asv::
575575

576576
pip install git+https://github.com/spacetelescope/asv
577577

578-
If you need to run a benchmark, change your directory to ``/asv_bench/`` and run
579-
the following if you have been developing on ``master``::
578+
If you need to run a benchmark, change your directory to ``asv_bench/`` and run::
580579

581-
asv continuous master
580+
asv continuous upstream/master HEAD
582581

583-
This command uses ``conda`` by default for creating the benchmark
582+
You can replace ``HEAD`` with the name of the branch you are working on.
583+
The command uses ``conda`` by default for creating the benchmark
584584
environments. If you want to use virtualenv instead, write::
585585

586-
asv continuous -E virtualenv master
586+
asv continuous -E virtualenv upstream/master HEAD
587587

588588
The ``-E virtualenv`` option should be added to all ``asv`` commands
589589
that run benchmarks. The default value is defined in ``asv.conf.json``.
590590

591-
If you are working on another branch, either of the following can be used::
591+
Running the full test suite can take up to one hour and use up to 3GB of RAM.
592+
Usually it is sufficient to paste only a subset of the results into the pull
593+
request to show that the committed changes do not cause unexpected performance
594+
regressions. You can run specific benchmarks using the ``-b`` flag, which
595+
takes a regular expression. For example, this will only run tests from a
596+
``pandas/asv_bench/benchmarks/groupby.py`` file::
592597

593-
asv continuous master HEAD
594-
asv continuous master your_branch
595-
596-
This will check out the master revision and run the suite on both master and
597-
your commit. Running the full test suite can take up to one hour and use up
598-
to 3GB of RAM. Usually it is sufficient to paste only a subset of the results into
599-
the pull request to show that the committed changes do not cause unexpected
600-
performance regressions.
601-
602-
You can run specific benchmarks using the ``-b`` flag, which takes a regular expression.
603-
For example, this will only run tests from a ``pandas/asv_bench/benchmarks/groupby.py``
604-
file::
605-
606-
asv continuous master -b groupby
598+
asv continuous upstream/master HEAD -b groupby
607599

608600
If you want to only run a specific group of tests from a file, you can do it
609601
using ``.`` as a separator. For example::
610602

611-
asv continuous master -b groupby.groupby_agg_builtins1
603+
asv continuous upstream/master HEAD -b groupby.groupby_agg_builtins
612604

613-
will only run a ``groupby_agg_builtins1`` test defined in a ``groupby`` file.
605+
will only run the ``groupby_agg_builtins`` benchmark defined in ``groupby.py``.
614606

615607
You can also run the benchmark suite using the version of ``pandas``
616608
already installed in your current Python environment. This can be

0 commit comments

Comments
 (0)