summaryrefslogtreecommitdiff
path: root/bench/wtperf/runners/wtperf_run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bench/wtperf/runners/wtperf_run.sh')
-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