summaryrefslogtreecommitdiffstats
path: root/src/testlib/qbenchmarkevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qbenchmarkevent.cpp')
-rw-r--r--src/testlib/qbenchmarkevent.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/testlib/qbenchmarkevent.cpp b/src/testlib/qbenchmarkevent.cpp
index 59a0db0b8d..5a895106a2 100644
--- a/src/testlib/qbenchmarkevent.cpp
+++ b/src/testlib/qbenchmarkevent.cpp
@@ -18,21 +18,16 @@ void QBenchmarkEvent::start()
QAbstractEventDispatcher::instance()->installNativeEventFilter(this);
}
-qint64 QBenchmarkEvent::checkpoint()
-{
- return eventCounter;
-}
-
-qint64 QBenchmarkEvent::stop()
+QList<QBenchmarkMeasurerBase::Measurement> QBenchmarkEvent::stop()
{
QAbstractEventDispatcher::instance()->removeNativeEventFilter(this);
- return eventCounter;
+ return { { qreal(eventCounter), QTest::Events } };
}
// It's very tempting to simply reject a measurement if 0 events
// where counted, however that is a possible situation and returning
// false here will create a infinite loop. Do not change this.
-bool QBenchmarkEvent::isMeasurementAccepted(qint64 measurement)
+bool QBenchmarkEvent::isMeasurementAccepted(QBenchmarkMeasurerBase::Measurement measurement)
{
Q_UNUSED(measurement);
return true;
@@ -49,11 +44,6 @@ int QBenchmarkEvent::adjustMedianCount(int suggestion)
return 1;
}
-QTest::QBenchmarkMetric QBenchmarkEvent::metricType()
-{
- return QTest::Events;
-}
-
// This could be done in a much better way, this is just the beginning.
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
bool QBenchmarkEvent::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result)