summaryrefslogtreecommitdiff
path: root/run/benchmark
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-10-28 15:49:15 +0100
committerCarl Hetherington <cth@carlh.net>2020-10-28 15:49:15 +0100
commitec82ce2d44d5ba492a3dfa6e740ff21549d438e1 (patch)
tree374f1a4b9ccb3d6c85f01559487520a5633c00bd /run/benchmark
parente5bb0569857ef2185ba7a53b884c014a4c6dd633 (diff)
Move benchmark out of test/ into benchmark/
Diffstat (limited to 'run/benchmark')
-rwxr-xr-xrun/benchmark14
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