42 #include "QtTest/qbenchmark.h" 43 #include "QtTest/private/qbenchmark_p.h" 44 #include "QtTest/private/qbenchmarkmetric_p.h" 47 #include <QtGui/qapplication.h> 50 #include <QtCore/qprocess.h> 51 #include <QtCore/qdir.h> 52 #include <QtCore/qset.h> 53 #include <QtCore/qdebug.h> 63 , medianIterationCount(-1)
65 , verboseOutput(false)
90 #ifdef QTESTLIB_USE_VALGRIND 94 #ifdef HAVE_TICK_COUNTER 96 measurer =
new QBenchmarkTickMeasurer;
127 QBenchmarkTestMethodData::current = 0;
155 bool accepted =
false;
162 else if (QBenchmarkTestMethodData::current->
runOnce || !setByMacro) {
201 if (runMode == RunOnce)
202 QBenchmarkTestMethodData::current->
runOnce =
true;
224 if (QBenchmarkTestMethodData::current->
runOnce)
293 QBenchmarkTestMethodData::current->
setResult(result, metric,
false);
296 template <
typename T>
299 Q_TYPENAME T::const_iterator
it = container.constBegin();
static QBenchmarkGlobalData * current
#define QT_END_NAMESPACE
This macro expands to.
#define it(className, varName)
QBenchmarkMetric
This enum lists all the things that can be benchmarked.
QBenchmarkMeasurerBase * measurer
virtual int adjustMedianCount(int suggestion)=0
virtual int adjustIterationCount(int suggestion)=0
virtual bool isMeasurementAccepted(qint64 measurement)=0
void setIterationCount(int count)
#define QT_BEGIN_NAMESPACE
This macro expands to.
Q_TESTLIB_EXPORT quint64 endBenchmarkMeasurement()
void Q_TESTLIB_EXPORT setBenchmarkResult(qreal result, QBenchmarkMetric metric)
Sets the benchmark result for this test function to result.
void setIterationCountHint(int count)
int adjustIterationCount(int suggestion)
QBenchmarkTestMethodData()
~QBenchmarkIterationController()
void setResult(qreal value, QTest::QBenchmarkMetric metric, bool setByMacro=true)
QBenchmarkMeasurerBase * createMeasurer()
~QBenchmarkTestMethodData()
static QBenchmarkTestMethodData * current
QBenchmarkIterationController()
Q_TYPENAME T::value_type qAverage(const T &container)
Q_TESTLIB_EXPORT void beginBenchmarkMeasurement()
static const KeyPair *const end
int adjustMedianIterationCount()