diff -r b72c6db6890b -r 5dc02b23752f src/testlib/qbenchmarkmeasurement.cpp --- a/src/testlib/qbenchmarkmeasurement.cpp Wed Jun 23 19:07:03 2010 +0300 +++ b/src/testlib/qbenchmarkmeasurement.cpp Tue Jul 06 15:10:48 2010 +0300 @@ -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