Changed minimum time measurement error from 0.00 to 0.01. Command line arguments are now saved to the output file. And the output of all three runs is now present in the output file, not only the output of the last run.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8415 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/scripts/measurement-functions b/drd/scripts/measurement-functions
index f03534b..1964d12 100644
--- a/drd/scripts/measurement-functions
+++ b/drd/scripts/measurement-functions
@@ -40,7 +40,7 @@
 ## Read a stream of numbers from stdin (one per line), and print the average
 #  and standard deviation.
 function avgstddev {
-  awk '{n++;m=NF;for(i=1;i<=NF;i++){sum[i]+=$i;sumsq[i]+=$i*$i}}END{for(i=1;i<=m;i++){d=sumsq[i]/n-sum[i]*sum[i]/n/n;printf "%.2f %.2f ",sum[i]/n,(d>0?sqrt(d):0)}}'
+  awk '{n++;m=NF;for(i=1;i<=NF;i++){sum[i]+=$i;sumsq[i]+=$i*$i}}END{for(i=1;i<=m;i++){d=sumsq[i]/n-sum[i]*sum[i]/n/n;printf "%.2f %.2f ",sum[i]/n,(d>0?sqrt(d):0.01)}}'
 }
 
 ## Query the virtual memory size for the last invocation of command $1 from
@@ -99,11 +99,14 @@
   local i
 
   echo "$@" >&2
+  if [ "${test_output}" != "" ]; then
+    echo "$@" >"${test_output}"
+  fi
   for ((i=0;i<3;i++))
   do
     echo -n "$("${test_input:-true}" $p | \
       /usr/bin/time --format="%e" "$@" 2>&1 | \
-      tee "${test_output:-/dev/null}" | \
+      tee -a "${test_output:-/dev/null}" | \
       tail -n 1) "
     query_vsz "$@"
   done