From 649766e2447bee1743c029a7f6b405e1aa46d193 Mon Sep 17 00:00:00 2001 From: Andy Fingerhut Date: Wed, 27 Feb 2013 12:54:41 -0800 Subject: [PATCH] Add run-one-bench.sh script, useful on Linux for measuring multiple JDK versions --- run-one-bench.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 run-one-bench.sh diff --git a/run-one-bench.sh b/run-one-bench.sh new file mode 100755 index 0000000..4e3942d --- /dev/null +++ b/run-one-bench.sh @@ -0,0 +1,56 @@ +#! /bin/bash + +if [ $# -lt 1 ] +then + echo "usage: $0 " + exit 1 +fi + +BENCHMARK="$1" + +# ${BENCHMARK}/batch.sh long + +# will run all Clojure versions that compile correctly, and don't take +# extremely long due to reflection, and thus are worth benchmarking. +# No reason to duplicate that version info here. + +for run in 1 2 3 +do + echo "" + echo "----------------------------------------" + echo "Starting set ${run}..." + echo "----------------------------------------" + # 1-4 for Linux + for jdk in 1 2 3 4 + # 5 for Mac OS X + #for jdk in 5 + do + case $jdk in + 1) + source ${HOME}/jdks/setup-oracle-1.6-32bit.sh + ;; + 2) + source ${HOME}/jdks/setup-oracle-1.6-64bit.sh + ;; + 3) + source ${HOME}/jdks/setup-oracle-1.7-32bit.sh + ;; + 4) + source ${HOME}/jdks/setup-oracle-1.7-64bit.sh + ;; + 5) + # No need to source any setup file on Mac OS X + ;; + esac + echo "" + echo " ----------------------------------------" + echo " Set ${run} using JDK number ${jdk} with 'java -version':" + java -version + echo " ----------------------------------------" + set -x + cd ${BENCHMARK} + ./batch.sh long + cd .. + set +x + done +done