summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorSusan LoVerso <sue@wiredtiger.com>2014-11-24 10:14:37 -0500
committerSusan LoVerso <sue@wiredtiger.com>2014-11-24 10:14:37 -0500
commitb46f7e350e9d3c04a699ce79dee7aff85873f68e (patch)
tree50182154ebb68d2519e9016656c9e7b05a9dacea /bench
parentafcc82e8ad5a31a205bd0c675416cff2abb52f66 (diff)
downloadmongo-b46f7e350e9d3c04a699ce79dee7aff85873f68e.tar.gz
Update wtperf Jenkins runner script to take explicit number of runs and
make most Jenkins jobs run once.
Diffstat (limited to 'bench')
-rwxr-xr-xbench/wtperf/runners/wtperf_run.sh33
1 files changed, 25 insertions, 8 deletions
diff --git a/bench/wtperf/runners/wtperf_run.sh b/bench/wtperf/runners/wtperf_run.sh
index 3296a4072b5..d5de7c4abdb 100755
--- a/bench/wtperf/runners/wtperf_run.sh
+++ b/bench/wtperf/runners/wtperf_run.sh
@@ -10,19 +10,20 @@
# build_posix/bench/wtperf).
#
# This script should be invoked with the pathname of the wtperf test
-# config to run.
+# config to run and the number of runs.
#
-if test "$#" -ne "1"; then
- echo "Must specify wtperf test to run"
+if test "$#" -ne "2"; then
+ echo "Must specify wtperf test to run and number of runs"
exit 1
fi
wttest=$1
+runmax=$2
+
home=./WT_TEST
outfile=./wtperf.out
rm -f $outfile
-runmax=5
-run=1
+# Each of these has an entry for each op in ops below.
avg=(0 0 0)
max=(0 0 0)
min=(0 0 0)
@@ -72,6 +73,7 @@ isstable()
getmin=0
getmax=1
+run=1
while test "$run" -le "$runmax"; do
rm -rf $home
mkdir $home
@@ -144,21 +146,36 @@ while test "$run" -le "$runmax"; do
run=`expr $run + 1`
done
-if test "$run" -le "$runmax"; then
+skipminmax=0
+if test "$runmax" -le "2"; then
+ numruns=$(getval $getmin $run $runmax)
+ skipminmax=1
+elif test "$run" -le "$runmax"; then
numruns=`expr $run - 2`
else
numruns=`expr $runmax - 2`
fi
+if test "$numruns" -eq "0"; then
+ $numruns=1
+fi
#
# The sum contains all runs. Subtract out the min/max values.
# Average the remaining and write it out to the file.
#
for i in ${!min[*]}; do
if test "$i" -eq "$loadindex"; then
- s=`echo "scale=3; ${sum[$i]} - ${min[$i]} - ${max[$i]}" | bc`
+ if test "$skipminmax" -eq "0"; then
+ s=`echo "scale=3; ${sum[$i]} - ${min[$i]} - ${max[$i]}" | bc`
+ else
+ s=${sum[$i]}
+ fi
avg[$i]=`echo "scale=3; $s / $numruns" | bc`
else
- s=`expr ${sum[$i]} - ${min[$i]} - ${max[$i]}`
+ if test "$skipminmax" -eq "0"; then
+ s=`expr ${sum[$i]} - ${min[$i]} - ${max[$i]}`
+ else
+ s=${sum[$i]}
+ fi
avg[$i]=`expr $s / $numruns`
fi
done