summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2017-04-05 10:58:30 +0200
committerKali Kaneko <kali@leap.se>2017-07-07 21:25:02 +0200
commit3846f131705d8745543121fcb9df707b921aad43 (patch)
treeeca3f899e386cd05cf16b3d7c546d769d122e7cc
parent5ad13db3f3aa147efdf255d410dc8bad0b0b3113 (diff)
[benchmarks] Add benchmark-all-commits.sh
-rwxr-xr-xbenchmark-all-commits.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/benchmark-all-commits.sh b/benchmark-all-commits.sh
new file mode 100755
index 00000000..f4367991
--- /dev/null
+++ b/benchmark-all-commits.sh
@@ -0,0 +1,24 @@
+#!/bin/sh -x
+#
+# Go backwards in git history and run benchmark tests
+# Export PYTEST_OPTS so pytest will post metrics to an elasticsearch
+# instance, i.e.
+#
+# export PYTEST_OPTS='--benchmark-autosave --benchmark-storage="elasticsearch+https://USER:PASSWORD@moose.leap.se:9200"'
+
+# Todo
+#
+# - Error handling. This script is dump and will run forever.
+
+rm -rf testing/.tox
+
+while /bin/true
+do
+ git checkout HEAD testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py
+
+ tox -c testing/tox.ini -e benchmark -- -x $PYTEST_OPTS
+
+ git reset HEAD testing/tox.ini
+ git checkout testing/tox.ini
+ git checkout HEAD^
+done