Changeset 846 for trunk/src/testlib/qbenchmarkmeasurement.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/testlib/qbenchmarkmeasurement.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 42 42 #include "QtTest/private/qbenchmarkmeasurement_p.h" 43 43 #include "QtTest/private/qbenchmark_p.h" 44 #include "QtTest/private/qbenchmarkmetric_p.h" 45 #include "qbenchmark.h" 44 46 #include <qdebug.h> 45 47 … … 65 67 bool QBenchmarkTimeMeasurer::isMeasurementAccepted(qint64 measurement) 66 68 { 67 return (measurement > 20);69 return (measurement > 50); 68 70 } 69 71 … … 73 75 } 74 76 77 bool QBenchmarkTimeMeasurer::needsWarmupIteration() 78 { 79 return true; 80 } 81 75 82 int QBenchmarkTimeMeasurer::adjustMedianCount(int) 76 83 { … … 78 85 } 79 86 80 Q String QBenchmarkTimeMeasurer::unitText()87 QTest::QBenchmarkMetric QBenchmarkTimeMeasurer::metricType() 81 88 { 82 return QLatin1String("msec"); 83 } 84 85 QString QBenchmarkTimeMeasurer::metricText() 86 { 87 return QLatin1String("walltime"); 89 return QTest::WalltimeMilliseconds; 88 90 } 89 91 … … 127 129 } 128 130 129 Q String QBenchmarkTickMeasurer::unitText()131 QTest::QBenchmarkMetric QBenchmarkTickMeasurer::metricType() 130 132 { 131 return QLatin1String("ticks"); 132 } 133 134 QString QBenchmarkTickMeasurer::metricText() 135 { 136 return QLatin1String("cputicks"); 133 return QTest::CPUTicks; 137 134 } 138 135
Note:
See TracChangeset
for help on using the changeset viewer.