From 2ec891d892d995f09f119fb0a36b976d3a53e013 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 29 Oct 2012 13:26:25 +0530 Subject: [PATCH] tests: Print average outer-loop iteration time in cpu-test --- src/tests/cpu-test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tests/cpu-test.c b/src/tests/cpu-test.c index b791e7fe4..f3308d9dc 100644 --- a/src/tests/cpu-test.c +++ b/src/tests/cpu-test.c @@ -55,8 +55,12 @@ _s1 += _stop - _start; \ _s2 += (_stop - _start) * (_stop - _start); \ } \ - pa_log_debug("%s: %llu usec (min = %llu, max = %llu, stddev = %g).", _label, (long long unsigned int)_s1, \ - (long long unsigned int)_min, (long long unsigned int)_max, sqrt(_times2 * _s2 - _s1 * _s1) / _times2); \ + pa_log_debug("%s: %llu usec (avg: %g, min = %llu, max = %llu, stddev = %g).", _label, \ + (long long unsigned int)_s1, \ + ((double)_s1 / _times2), \ + (long long unsigned int)_min, \ + (long long unsigned int)_max, \ + sqrt(_times2 * _s2 - _s1 * _s1) / _times2); \ } /* Common defines for svolume tests */