diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-10-28 15:49:15 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-10-28 15:49:15 +0100 |
| commit | ec82ce2d44d5ba492a3dfa6e740ff21549d438e1 (patch) | |
| tree | 374f1a4b9ccb3d6c85f01559487520a5633c00bd /run/benchmark | |
| parent | e5bb0569857ef2185ba7a53b884c014a4c6dd633 (diff) | |
Move benchmark out of test/ into benchmark/
Diffstat (limited to 'run/benchmark')
| -rwxr-xr-x | run/benchmark | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/run/benchmark b/run/benchmark index 62c40fa2..3f18afbe 100755 --- a/run/benchmark +++ b/run/benchmark @@ -1,16 +1,22 @@ #!/bin/bash +perf=0 +if [ "$1" == "--perf" ]; then + perf=1 + shift +fi + bm=$1 +shift if [ "$bm" == "" ]; then echo "Syntax: $0 [--perf] <benchmark>" exit 1 fi export LD_LIBRARY_PATH=build/src -if [ "$1" == "--perf" ]; then - shift - perf stat build/benchmark/$1 +if [ "$perf" == "1" ]; then + perf stat build/benchmark/$bm "$*" else - build/benchmark/$1 + build/benchmark/$bm "$*" fi |
