diff options
author | Mirko Boehm (AWS) <mirko@agile-workers.com> | 2013-03-14 08:32:38 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-19 10:29:23 +0100 |
commit | 1a708277c587031d4d00e095be8251e3893b0c45 (patch) | |
tree | 39fd606c2b6f335281bcdc76e9b5df8739ece9e5 /src/testlib/qbenchmark.cpp | |
parent | 9817707c715e87f470df0f25024333a01b94b0cc (diff) |
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 <macadder1@gmail.com>
Diffstat (limited to 'src/testlib/qbenchmark.cpp')
-rw-r--r-- | src/testlib/qbenchmark.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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_); |