From: Bart Van Assche Date: Thu, 10 Jul 2008 13:57:56 +0000 (+0000) Subject: Changed minimum time measurement error from 0.00 to 0.01. Command line arguments... X-Git-Tag: svn/VALGRIND_3_4_0~332 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9d91d96d6532f6b5f830f08975c7a24a09d9d48;p=thirdparty%2Fvalgrind.git 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 --- diff --git a/drd/scripts/measurement-functions b/drd/scripts/measurement-functions index f03534b66f..1964d125d1 100644 --- a/drd/scripts/measurement-functions +++ b/drd/scripts/measurement-functions @@ -40,7 +40,7 @@ function get_cache_size { ## 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 @@ function measure_runtime { 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