summaryrefslogtreecommitdiff
path: root/run/benchmark
blob: ad0924f22415a305e58d0a30ab977a8871d160a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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
elif [ "$1" == "--debug" ]; then
  shift
  gdb build/benchmark/$1
elif [ "$1" == "--valgrind" ]; then
  shift
  valgrind --tool="memcheck" build/benchmark/$1
else
  build/benchmark/$1
fi