summaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-05-31 21:49:41 +0200
committerCarl Hetherington <cth@carlh.net>2020-05-31 21:49:41 +0200
commit46ef94502b3df6f4142c79e6926df34ca619f9dc (patch)
tree1b7449bf4caaeaf3d0d834e68aa61c1305a99d16 /run
parentda78a8adb2302b15f89d353fa6610385f0bf2a69 (diff)
Add very simple benchmark for rgb_to_xyz.
Diffstat (limited to 'run')
-rwxr-xr-xrun/benchmark16
1 files changed, 16 insertions, 0 deletions
diff --git a/run/benchmark b/run/benchmark
new file mode 100755
index 00000000..62c40fa2
--- /dev/null
+++ b/run/benchmark
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+bm=$1
+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
+else
+ build/benchmark/$1
+fi
+