From 1a708277c587031d4d00e095be8251e3893b0c45 Mon Sep 17 00:00:00 2001 From: "Mirko Boehm (AWS)" Date: Thu, 14 Mar 2013 08:32:38 +0100 Subject: Add minimumtotal option to improve accuracy of short-lived benchmarks. Short-lived benchmarks (benchmarks that complete in a very short period of measured time) are often more affected by jitter and warm-up effects than longer running benchmarks. Since QBENCHMARK stores the median result of all accepted benchmark runs, a larger number of aggregation runs is preferable for short-lived tests, but not necessarily for longer running ones. The minimumtotal option, specified in units of the selected measurement, will make the benchmark repeat a benchmark until the total measured cost exceeds the specified threshold. The displayed median result will then tend to be more accurate. This is especially useful for data-driven benchmarks in case the data tags scale the benchmarked operation from little to large cost. Change-Id: Ib857de64aaffc77715a0000d36f0245f31d86b9a Reviewed-by: Jason McDonald --- src/testlib/qbenchmark.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/testlib/qbenchmark.cpp') diff --git a/src/testlib/qbenchmark.cpp b/src/testlib/qbenchmark.cpp index 91cafc99e3..3ef29e19ce 100644 --- a/src/testlib/qbenchmark.cpp +++ b/src/testlib/qbenchmark.cpp @@ -59,6 +59,7 @@ QBenchmarkGlobalData::QBenchmarkGlobalData() , medianIterationCount(-1) , createChart(false) , verboseOutput(false) + , minimumTotal(-1) , mode_(WallTime) { setMode(mode_); -- cgit v1.2.3