Changeset 846 for trunk/src/testlib/qbenchmark_p.h
- 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/qbenchmark_p.h
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) … … 43 43 #define QBENCHMARK_P_H 44 44 45 #include <stdlib.h> 46 45 47 // 46 48 // W A R N I N G … … 69 71 #endif 70 72 #include "QtTest/private/qbenchmarkevent_p.h" 73 #include "QtTest/private/qbenchmarkmetric_p.h" 71 74 72 75 QT_BEGIN_NAMESPACE … … 93 96 public: 94 97 QBenchmarkContext context; 95 q int64value;98 qreal value; 96 99 int iterations; 100 QTest::QBenchmarkMetric metric; 101 bool setByMacro; 97 102 bool valid; 98 103 … … 100 105 : value(-1) 101 106 , iterations(-1) 107 , setByMacro(true) 102 108 , valid(false) 103 { } 104 105 QBenchmarkResult(const QBenchmarkContext &context, const qint64 value, const int iterations) 109 { } 110 111 QBenchmarkResult( 112 const QBenchmarkContext &context, const qreal value, const int iterations, 113 QTest::QBenchmarkMetric metric, bool setByMacro) 106 114 : context(context) 107 115 , value(value) 108 116 , iterations(iterations) 117 , metric(metric) 118 , setByMacro(setByMacro) 109 119 , valid(true) 110 { 111 } 120 { } 112 121 113 122 bool operator<(const QBenchmarkResult &other) const … … 168 177 bool resultsAccepted() const { return resultAccepted; } 169 178 int adjustIterationCount(int suggestion); 170 void setResult(q int64 value);179 void setResult(qreal value, QTest::QBenchmarkMetric metric, bool setByMacro = true); 171 180 172 181 QBenchmarkResult result; … … 184 193 185 194 Q_TESTLIB_EXPORT void beginBenchmarkMeasurement(); 186 Q_TESTLIB_EXPORT qint64 endBenchmarkMeasurement(); 187 188 void setResult(qint64 result); 189 void setResult(const QString &tag, qint64 result); 195 Q_TESTLIB_EXPORT quint64 endBenchmarkMeasurement(); 190 196 } 191 197
Note:
See TracChangeset
for help on using the changeset viewer.