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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: update benchmarking docs to use dev.py user interface #16633

Merged
merged 5 commits into from Sep 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions benchmarks/asv.conf.json
Expand Up @@ -42,6 +42,7 @@
"pytest": [],
"pythran": [],
"pybind11": [],
"meson-python": [],
},

// The directory (relative to the current directory) that benchmarks are
Expand Down
2 changes: 1 addition & 1 deletion dev.py
Expand Up @@ -839,7 +839,7 @@ def scipy_bench(cls, args):

@classmethod
def run(cls, **kwargs):
"""run benchamark"""
"""run benchmark"""
kwargs.update(cls.ctx.get())
Args = namedtuple('Args', [k for k in kwargs.keys()])
args = Args(**kwargs)
Expand Down
10 changes: 5 additions & 5 deletions doc/source/dev/contributor/benchmarking.rst
Expand Up @@ -92,9 +92,9 @@ submitting a pull request.
To run all benchmarks, navigate to the root SciPy directory at the
command line and execute::

python runtests.py --bench
python dev.py bench

where ``--bench`` activates the benchmark suite instead of the test
where ``bench`` activates the benchmark suite instead of the test
suite. This builds SciPy and runs the benchmarks. (*Note: this could
take a while. Benchmarks often take longer to run than unit tests, and
each benchmark is run multiple times to measure the distribution in
Expand All @@ -104,17 +104,17 @@ To run benchmarks from a particular benchmark module, such as
``optimize_linprog.py``, simply append the filename without the
extension::

python runtests.py --bench optimize_linprog
python dev.py bench -t optimize_linprog

To run a benchmark defined in a class, such as ``KleeMinty`` from
``optimize_linprog.py``::

python runtests.py --bench optimize_linprog.KleeMinty
python dev.py bench -t optimize_linprog.KleeMinty

To compare benchmark results between the active branch and another, such
as ``main``::

python runtests.py --bench-compare main optimize_linprog.KleeMinty
python dev.py bench --compare main # select again by `-t optimize_linprog`

All of the commands above display the results in plain text in the
console, and the results are not saved for comparison with future
Expand Down