summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohit Goswami <rog32@hi.is>2022-12-26 03:19:24 +0530
committerRohit Goswami <rog32@hi.is>2022-12-26 03:19:24 +0530
commit1adc626354456d9c4604351dd40af5865068878a (patch)
treebdec5543ef8aae4628730ee5c58f5b79ec4b2bfd
parent2b9851ba4f8cc436266d913eb5db75fc702e1eed (diff)
downloadnumpy-1adc626354456d9c4604351dd40af5865068878a.tar.gz
DOC: Add details on benchmarking versions
-rw-r--r--benchmarks/README.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/benchmarks/README.rst b/benchmarks/README.rst
index 2700e95e7..59f503e35 100644
--- a/benchmarks/README.rst
+++ b/benchmarks/README.rst
@@ -69,6 +69,26 @@ Command-line help is available as usual via ``asv --help`` and
.. _ASV documentation: https://asv.readthedocs.io/
+Benchmarking versions
+---------------------
+
+To benchmark or visualize only releases on different machines locally, the tags with their commits can be generated, before being run with ``asv``, that is::
+
+ cd benchmarks
+ # Get commits for tags
+ # delete tag_commits.txt before re-runs
+ for gtag in $(git tag --list --sort taggerdate | grep "^v"); do
+ git log $gtag --oneline -n1 --decorate=no | awk -v gtg="$gtag" '{print $1, gtg;}' >> tag_commits.txt
+ done
+ # Take last 20
+ for commitLine in $(tail --lines=20 tag_commits.txt); do
+ asv run $(echo $commitLine | awk '{print $1}')^!
+ done
+ # Publish and view
+ asv publish
+ asv preview
+
+Note that this can still be a significant time commitment. Do not open pull requests to the main repository with these results.
Writing benchmarks
------------------