summaryrefslogtreecommitdiff
path: root/run
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
parente5bb0569857ef2185ba7a53b884c014a4c6dd633 (diff)
Move benchmark out of test/ into benchmark/
Diffstat (limited to 'run')
-rwxr-xr-xrun/bench18
-rwxr-xr-xrun/benchmark14
2 files changed, 10 insertions, 22 deletions
diff --git a/run/bench b/run/bench
deleted file mode 100755
index ec6890be..00000000
--- a/run/bench
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-# Private test data; this is stuff that is non-distributable
-private=../libdcp1-test-private
-
-export LD_LIBRARY_PATH=build/src:build/asdcplib/src:$LD_LIBRARY_PATH
-if [ "$1" == "--debug" ]; then
- shift
- gdb --args build/test/bench $private
-elif [ "$1" == "--valgrind" ]; then
- shift
- valgrind --tool="memcheck" build/test/bench $private
-elif [ "$1" == "--callgrind" ]; then
- shift
- valgrind --tool="callgrind" build/test/bench $private
-else
- build/test/bench $private
-fi
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