From 4ef9bf730bc87aefe8c7b3f326969c4f8916e0a6 Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 5 Apr 2017 10:58:30 +0200 Subject: [test] Add benchmark-all-commits.sh --- benchmark-all-commits.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 benchmark-all-commits.sh 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 -- cgit v1.2.3