#!/bin/bash perf=0 if [ "$1" == "--perf" ]; then perf=1 shift fi bm=$1 shift if [ "$bm" == "" ]; then echo "Syntax: $0 [--perf] " exit 1 fi export LD_LIBRARY_PATH=build/src if [ "$perf" == "1" ]; then perf stat build/benchmark/$bm "$*" else build/benchmark/$bm "$*" fi