42 #ifndef QBENCHMARK_P_H 43 #define QBENCHMARK_P_H 58 #include <QtCore/qglobal.h> 60 #if (defined(Q_OS_LINUX) || defined Q_OS_MAC) && !defined(QT_NO_PROCESS) 61 #define QTESTLIB_USE_VALGRIND 63 #undef QTESTLIB_USE_VALGRIND 66 #include "QtTest/private/qbenchmarkmeasurement_p.h" 67 #include <QtCore/QMap> 68 #include <QtTest/qtest_global.h> 69 #ifdef QTESTLIB_USE_VALGRIND 70 #include "QtTest/private/qbenchmarkvalgrind_p.h" 72 #include "QtTest/private/qbenchmarkevent_p.h" 73 #include "QtTest/private/qbenchmarkmetric_p.h" 116 , iterations(iterations)
118 , setByMacro(setByMacro)
140 enum Mode {
WallTime, CallgrindParentProcess, CallgrindChildProcess, TickCounter, EventCounter };
141 void setMode(
Mode mode);
144 int adjustMedianIterationCount();
178 int adjustIterationCount(
int suggestion);
200 #endif // QBENCHMARK_H
QTest::QBenchmarkMetric metric
static QBenchmarkGlobalData * current
#define QT_END_NAMESPACE
This macro expands to.
bool operator<(const QBenchmarkResult &other) const
QBenchmarkMetric
This enum lists all the things that can be benchmarked.
The QString class provides a Unicode character string.
QBenchmarkMeasurerBase * measurer
void setIterationCount(int count)
QString callgrindOutFileBase
#define QT_BEGIN_NAMESPACE
This macro expands to.
Q_TESTLIB_EXPORT quint64 endBenchmarkMeasurement()
void setIterationCountHint(int count)
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
bool resultsAccepted() const
QBenchmarkResult(const QBenchmarkContext &context, const qreal value, const int iterations, QTest::QBenchmarkMetric metric, bool setByMacro)
static QBenchmarkTestMethodData * current
QBenchmarkContext context
Q_TESTLIB_EXPORT void beginBenchmarkMeasurement()
QBenchmarkContext context
The QTest namespace contains all the functions and declarations that are related to the QTestLib tool...