diff -r 93b982ccede2 -r 5daf16870df6 src/testlib/qbenchmarkmeasurement.cpp --- a/src/testlib/qbenchmarkmeasurement.cpp Mon Jun 21 22:38:13 2010 +0100 +++ b/src/testlib/qbenchmarkmeasurement.cpp Thu Jul 22 16:41:55 2010 +0100 @@ -41,6 +41,8 @@ #include "QtTest/private/qbenchmarkmeasurement_p.h" #include "QtTest/private/qbenchmark_p.h" +#include "QtTest/private/qbenchmarkmetric_p.h" +#include "qbenchmark.h" #include QT_BEGIN_NAMESPACE @@ -77,14 +79,9 @@ return 1; } -QString QBenchmarkTimeMeasurer::unitText() +QTest::QBenchmarkMetric QBenchmarkTimeMeasurer::metricType() { - return QLatin1String("msec"); -} - -QString QBenchmarkTimeMeasurer::metricText() -{ - return QLatin1String("walltime"); + return QTest::WalltimeMilliseconds; } #ifdef HAVE_TICK_COUNTER // defined in 3rdparty/cycle_p.h @@ -126,14 +123,9 @@ return true; } -QString QBenchmarkTickMeasurer::unitText() +QTest::QBenchmarkMetric QBenchmarkTickMeasurer::metricType() { - return QLatin1String("ticks"); -} - -QString QBenchmarkTickMeasurer::metricText() -{ - return QLatin1String("cputicks"); + return QTest::CPUTicks; } #endif