X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=bench.sh;h=e74d5c37d3d723e69f8d68c179432a284f26a396;hb=43d5b7da66c7ef82af941805564db860191cf157;hp=a42fee7978acb35fe669ffed47f26806fcc91860;hpb=69779fd7948b7b286d28ef17ed5abd655a73c52e;p=model-checker-benchmarks.git diff --git a/bench.sh b/bench.sh index a42fee7..e74d5c3 100755 --- a/bench.sh +++ b/bench.sh @@ -1,17 +1,31 @@ #!/bin/bash # A (work-in-progress) test script for running our benchmarks -# Runs all tests, logging output to a directory named 'run-' +# Runs all tests, logging output to a directory named +# '${BASEDIR}/run-', where ${BASEDIR} is either the current +# directory or the first parameter to this script ## Unfinished benchmarks - do not use # queue williams-queue DATECMD="date +%Y-%m-%d-%R" DATE="`${DATECMD}`" -DIR="run-${DATE}" +BASEDIR=. -TESTS="barrier/barrier mcs-lock/mcs-lock spsc-queue/spsc-queue mpmc-queue/mpmc-1r2w mpmc-queue/mpmc-2r1w mpmc-queue/mpmc-queue linuxrwlocks/linuxrwlocks" -MODEL_ARGS="-f 4 -m 2" +[ $# -gt 0 ] && [ -d "$1" ] && BASEDIR="$1" && shift + +DIR="${BASEDIR}/run-${DATE}" + +TESTS="barrier/barrier" +TESTS+=" mcs-lock/mcs-lock" +TESTS+=" spsc-queue/spsc-queue" +TESTS+=" spsc-bugfix/spsc-queue" +TESTS+=" mpmc-queue/mpmc-2r1w" +TESTS+=" mpmc-queue/mpmc-1r2w-noinit" +TESTS+=" mpmc-queue/mpmc-queue-noinit" +TESTS+=" linuxrwlocks/linuxrwlocks" + +MODEL_ARGS="-f 10 -m 2 -e 1" COUNT=0 function run_test { @@ -37,7 +51,7 @@ function run_test { echo "*******************************" echo "Re-running test for timing data" echo "*******************************" - time ${RUN} ${t} ${ARGS} > /dev/null 2>&1 + (time ${RUN} ${t} ${ARGS} > /dev/null 2>&1) 2>&1 echo echo "Test done; sleeping for a few seconds" echo