summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-28 16:46:33 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-28 16:46:33 (GMT)
commit6c6c76553e424291bb3b3d2112d09c96604850d9 (patch)
tree6a58cf63131810264d526eae1f3f9d22e4ba6ec8 /src/testlib
parent9da305aedfaa5da5a3059c99ac5a5389dab42b10 (diff)
parent60c12264b0ff01bb4888323b3acda0bc581021a7 (diff)
downloadQt-6c6c76553e424291bb3b3d2112d09c96604850d9.zip
Qt-6c6c76553e424291bb3b3d2112d09c96604850d9.tar.gz
Qt-6c6c76553e424291bb3b3d2112d09c96604850d9.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed bug where testlib would not respect the -iterations option. Improve precision of testlib benchmarking. QMetaMethod::invoke: Document that the function does not check the arguments add test for QMetaMethod::invoke Make QGLBuffer copiable
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qbenchmark.cpp2
-rw-r--r--src/testlib/qbenchmarkmeasurement.cpp7
-rw-r--r--src/testlib/qbenchmarkmeasurement_p.h1
3 files changed, 8 insertions, 2 deletions
diff --git a/src/testlib/qbenchmark.cpp b/src/testlib/qbenchmark.cpp
index 23c5639..c88ecb0 100644
--- a/src/testlib/qbenchmark.cpp
+++ b/src/testlib/qbenchmark.cpp
@@ -159,7 +159,7 @@ void QBenchmarkTestMethodData::setResult(
if (QBenchmarkGlobalData::current->iterationCount != -1)
accepted = true;
- if (QBenchmarkTestMethodData::current->runOnce || !setByMacro) {
+ else if (QBenchmarkTestMethodData::current->runOnce || !setByMacro) {
iterationCount = 1;
accepted = true;
}
diff --git a/src/testlib/qbenchmarkmeasurement.cpp b/src/testlib/qbenchmarkmeasurement.cpp
index c03cbff..0a84792 100644
--- a/src/testlib/qbenchmarkmeasurement.cpp
+++ b/src/testlib/qbenchmarkmeasurement.cpp
@@ -66,7 +66,7 @@ qint64 QBenchmarkTimeMeasurer::stop()
bool QBenchmarkTimeMeasurer::isMeasurementAccepted(qint64 measurement)
{
- return (measurement > 20);
+ return (measurement > 50);
}
int QBenchmarkTimeMeasurer::adjustIterationCount(int suggestion)
@@ -74,6 +74,11 @@ int QBenchmarkTimeMeasurer::adjustIterationCount(int suggestion)
return suggestion;
}
+bool QBenchmarkTimeMeasurer::needsWarmupIteration()
+{
+ return true;
+}
+
int QBenchmarkTimeMeasurer::adjustMedianCount(int)
{
return 1;
diff --git a/src/testlib/qbenchmarkmeasurement_p.h b/src/testlib/qbenchmarkmeasurement_p.h
index 8ad3613..932852c 100644
--- a/src/testlib/qbenchmarkmeasurement_p.h
+++ b/src/testlib/qbenchmarkmeasurement_p.h
@@ -84,6 +84,7 @@ public:
bool isMeasurementAccepted(qint64 measurement);
int adjustIterationCount(int sugestion);
int adjustMedianCount(int suggestion);
+ bool needsWarmupIteration();
QTest::QBenchmarkMetric metricType();
private:
QTime time;