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 | |
| parent | e5bb0569857ef2185ba7a53b884c014a4c6dd633 (diff) | |
Move benchmark out of test/ into benchmark/
| -rw-r--r-- | benchmark/j2k_transcode.cc (renamed from test/bench.cc) | 1 | ||||
| -rw-r--r-- | benchmark/wscript | 2 | ||||
| -rwxr-xr-x | run/bench | 18 | ||||
| -rwxr-xr-x | run/benchmark | 14 | ||||
| -rw-r--r-- | test/wscript | 8 |
5 files changed, 11 insertions, 32 deletions
diff --git a/test/bench.cc b/benchmark/j2k_transcode.cc index cfda4612..1a814b69 100644 --- a/test/bench.cc +++ b/benchmark/j2k_transcode.cc @@ -32,7 +32,6 @@ */ #include "data.h" -#include "test.h" #include "util.h" #include "version.h" #include "j2k.h" diff --git a/benchmark/wscript b/benchmark/wscript index 3a045589..219ca3fe 100644 --- a/benchmark/wscript +++ b/benchmark/wscript @@ -32,7 +32,7 @@ # def build(bld): - for p in ['rgb_to_xyz']: + for p in ['rgb_to_xyz', 'j2k_transcode']: obj = bld(features='cxx cxxprogram') obj.name = p obj.uselib = 'BOOST_FILESYSTEM ASDCPLIB_CTH' 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 diff --git a/test/wscript b/test/wscript index aa134bde..9a8a7b53 100644 --- a/test/wscript +++ b/test/wscript @@ -138,11 +138,3 @@ def build(bld): obj.source = 'rewrite_subs.cc' obj.target = 'rewrite_subs' obj.install_path = '' - - obj = bld(features='cxx cxxprogram') - obj.name = 'bench' - obj.uselib = 'BOOST_FILESYSTEM OPENJPEG CXML OPENMP ASDCPLIB_CTH XMLSEC1 OPENSSL LIBXML++' - obj.use = 'libdcp%s' % bld.env.API_VERSION - obj.source = 'bench.cc' - obj.target = 'bench' - obj.install_path = '' |
