Skip to content

Commit cd07fac

Browse files
hfactor13rgommers
andauthored
DOC: update benchmarking docs to use dev.py user interface (scipy#16633)
The runtest.py module is being phased out in favor of the dev.py module. Replaced "--bench" with "bench" for running all benchmarks, and "bench -t" for running specific benchmarks. * BENCH: fix `dev.py bench --compare` so it works correctly (`meson-python` was missing) Also update the doc command for it [skip ci] Co-authored-by: Henry Cuzco <40706933+uiucmeche1317@users.noreply.github.com> Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
1 parent 81487e8 commit cd07fac

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

benchmarks/asv.conf.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"pytest": [],
4343
"pythran": [],
4444
"pybind11": [],
45+
"meson-python": [],
4546
},
4647

4748
// The directory (relative to the current directory) that benchmarks are

dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ def scipy_bench(cls, args):
850850

851851
@classmethod
852852
def run(cls, **kwargs):
853-
"""run benchamark"""
853+
"""run benchmark"""
854854
kwargs.update(cls.ctx.get())
855855
Args = namedtuple('Args', [k for k in kwargs.keys()])
856856
args = Args(**kwargs)

doc/source/dev/contributor/benchmarking.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ submitting a pull request.
9292
To run all benchmarks, navigate to the root SciPy directory at the
9393
command line and execute::
9494

95-
python runtests.py --bench
95+
python dev.py bench
9696

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

107-
python runtests.py --bench optimize_linprog
107+
python dev.py bench -t optimize_linprog
108108

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

112-
python runtests.py --bench optimize_linprog.KleeMinty
112+
python dev.py bench -t optimize_linprog.KleeMinty
113113

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

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

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

0 commit comments

Comments
 (0)