summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Sorvig <msorvig@trolltech.com>2009-08-11 11:20:17 (GMT)
committerMorten Sorvig <msorvig@trolltech.com>2009-08-11 11:20:17 (GMT)
commit19059f306d1d8154bb330b7c428982baf6a964ec (patch)
treef11c573f6b3afaa7020acfe2ac78abcf0cc98f7f
parent72ce054c0f5ed1691ad4056f03e240b69a39e8c7 (diff)
downloadQt-19059f306d1d8154bb330b7c428982baf6a964ec.zip
Qt-19059f306d1d8154bb330b7c428982baf6a964ec.tar.gz
Qt-19059f306d1d8154bb330b7c428982baf6a964ec.tar.bz2
Perform the variable initalizations _before_ starting the clock.
Removes a few of cycles erronously included in the results.
-rw-r--r--src/testlib/qbenchmark.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testlib/qbenchmark.cpp b/src/testlib/qbenchmark.cpp
index 42ce662..8a2cc44 100644
--- a/src/testlib/qbenchmark.cpp
+++ b/src/testlib/qbenchmark.cpp
@@ -192,16 +192,16 @@ void QBenchmarkTestMethodData::setResult(qint64 value)
*/
QTest::QBenchmarkIterationController::QBenchmarkIterationController(RunMode runMode)
{
- QTest::beginBenchmarkMeasurement();
i = 0;
if (runMode == RunOnce)
QBenchmarkTestMethodData::current->runOnce = true;
+ QTest::beginBenchmarkMeasurement();
}
QTest::QBenchmarkIterationController::QBenchmarkIterationController()
{
- QTest::beginBenchmarkMeasurement();
i = 0;
+ QTest::beginBenchmarkMeasurement();
}
/*! \internal