diff options
author | drebs <drebs@leap.se> | 2017-07-05 11:30:41 -0300 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-07-07 21:25:19 +0200 |
commit | cf6e62b1170bb3ad1090ab04817718508147ca9e (patch) | |
tree | 7ea836608acb0a1558a4651dbfe161ebcc391e9d | |
parent | 413d2e7c77a61b583eb4506c1f6fda2d46185c7a (diff) |
[benchmarks] stop benchmarking-all-commits when first commit is reached
-rwxr-xr-x | scripts/benchmark/benchmark-all-commits.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/benchmark/benchmark-all-commits.sh b/scripts/benchmark/benchmark-all-commits.sh index 60c37df9..086342bf 100755 --- a/scripts/benchmark/benchmark-all-commits.sh +++ b/scripts/benchmark/benchmark-all-commits.sh @@ -1,16 +1,19 @@ #!/bin/bash -x # -# Go backwards in git history and run benchmark tests +# 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"' +# # or, for testing a single test group: +# # export PYTEST_OPTS='--benchmark-autosave --benchmark-storage="elasticsearch+https://USER:PASSWORD@moose.leap.se:9200" -m benchmark_test_instance' # # Todo # -# - Error handling. This script is dump and will run forever. +# - Error handling. This script is dumb and will run forever. # Too many commits just fail for different reasons, # so we just benchmark thoses that succeed. @@ -56,5 +59,11 @@ do git show | head -6 echo + # checkout next commit git reset --hard HEAD^ + + # stop if we reached the first commit in the repo + if [ $? -ne 0 ]; then + break + fi done |