summaryrefslogtreecommitdiff
path: root/bench/wtperf/runners
diff options
context:
space:
mode:
authorSusan LoVerso <sue@wiredtiger.com>2014-09-11 15:41:39 -0400
committerSusan LoVerso <sue@wiredtiger.com>2014-09-11 15:41:39 -0400
commit5e2285ec4ad0ab2f2e462263c1cd14322891ca19 (patch)
tree3219bda7584eb7e33ad85fc3ac86ecee5c3d5d84 /bench/wtperf/runners
parent9aa60daf738067bc42f6130fbf60c8f5e9815986 (diff)
downloadmongo-5e2285ec4ad0ab2f2e462263c1cd14322891ca19.tar.gz
Restore load time to floating point for better granularity. Restore
runner script to expect floating point for load time.
Diffstat (limited to 'bench/wtperf/runners')
-rwxr-xr-xbench/wtperf/runners/wtperf_run.sh26
1 files changed, 20 insertions, 6 deletions
diff --git a/bench/wtperf/runners/wtperf_run.sh b/bench/wtperf/runners/wtperf_run.sh
index 16470f35dfa..3296a4072b5 100755
--- a/bench/wtperf/runners/wtperf_run.sh
+++ b/bench/wtperf/runners/wtperf_run.sh
@@ -79,7 +79,7 @@ while test "$run" -le "$runmax"; do
if test "$?" -ne "0"; then
exit 1
fi
- # Load uses different text. Handle separately.
+ # Load is always using floating point, so handle separately
l=`grep "^Load time:" ./WT_TEST/test.stat`
if test "$?" -eq "0"; then
load=`echo $l | cut -d ' ' -f 3`
@@ -87,7 +87,7 @@ while test "$run" -le "$runmax"; do
load=0
fi
cur[$loadindex]=$load
- sum[$loadindex]=`expr $load + ${sum[$loadindex]}`
+ sum[$loadindex]=`echo "${sum[$loadindex]} + $load" | bc`
echo "cur ${cur[$loadindex]} sum ${sum[$loadindex]}" >> $outfile
for i in ${!ops[*]}; do
l=`grep "Executed.*${ops[$i]} operations" ./WT_TEST/test.stat`
@@ -109,8 +109,17 @@ while test "$run" -le "$runmax"; do
done
else
for i in ${!cur[*]}; do
- min[$i]=$(getval $getmin ${cur[$i]} ${min[$i]})
- max[$i]=$(getval $getmax ${cur[$i]} ${max[$i]})
+ if test "$i" -eq "$loadindex"; then
+ if (($(bc <<< "${cur[$i]} < ${min[$i]}") )); then
+ min[$i]=${cur[$i]}
+ fi
+ if (($(bc <<< "${cur[$i]} > ${max[$i]}") )); then
+ max[$i]=${cur[$i]}
+ fi
+ else
+ min[$i]=$(getval $getmin ${cur[$i]} ${min[$i]})
+ max[$i]=$(getval $getmax ${cur[$i]} ${max[$i]})
+ fi
done
fi
#
@@ -145,8 +154,13 @@ fi
# Average the remaining and write it out to the file.
#
for i in ${!min[*]}; do
- s=`expr ${sum[$i]} - ${min[$i]} - ${max[$i]}`
- avg[$i]=`expr $s / $numruns`
+ if test "$i" -eq "$loadindex"; then
+ s=`echo "scale=3; ${sum[$i]} - ${min[$i]} - ${max[$i]}" | bc`
+ avg[$i]=`echo "scale=3; $s / $numruns" | bc`
+ else
+ s=`expr ${sum[$i]} - ${min[$i]} - ${max[$i]}`
+ avg[$i]=`expr $s / $numruns`
+ fi
done
for i in ${!outp[*]}; do
echo "${outp[$i]} ${avg[$i]}" >> $outfile