QBenchlib: remove unused checkpoint() virtual
It was probably part of the original design to have an intermediate measurement to determine whether the results were acceptable or not, but it was never used. So just remove. Change-Id: I3c79b7e08fa346988dfefffd1720281b2512b8c1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jason McDonald <macadder1@gmail.com>
This commit is contained in:
parent
148c3eaa29
commit
1a769c36e4
@ -18,11 +18,6 @@ void QBenchmarkEvent::start()
|
||||
QAbstractEventDispatcher::instance()->installNativeEventFilter(this);
|
||||
}
|
||||
|
||||
qint64 QBenchmarkEvent::checkpoint()
|
||||
{
|
||||
return eventCounter;
|
||||
}
|
||||
|
||||
qint64 QBenchmarkEvent::stop()
|
||||
{
|
||||
QAbstractEventDispatcher::instance()->removeNativeEventFilter(this);
|
||||
|
@ -28,7 +28,6 @@ public:
|
||||
QBenchmarkEvent();
|
||||
~QBenchmarkEvent();
|
||||
void start() override;
|
||||
qint64 checkpoint() override;
|
||||
qint64 stop() override;
|
||||
bool isMeasurementAccepted(qint64 measurement) override;
|
||||
int adjustIterationCount(int suggestion) override;
|
||||
|
@ -16,11 +16,6 @@ void QBenchmarkTimeMeasurer::start()
|
||||
time.start();
|
||||
}
|
||||
|
||||
qint64 QBenchmarkTimeMeasurer::checkpoint()
|
||||
{
|
||||
return time.elapsed();
|
||||
}
|
||||
|
||||
qint64 QBenchmarkTimeMeasurer::stop()
|
||||
{
|
||||
return time.elapsed();
|
||||
@ -58,12 +53,6 @@ void QBenchmarkTickMeasurer::start()
|
||||
startTicks = getticks();
|
||||
}
|
||||
|
||||
qint64 QBenchmarkTickMeasurer::checkpoint()
|
||||
{
|
||||
CycleCounterTicks now = getticks();
|
||||
return qRound64(elapsed(now, startTicks));
|
||||
}
|
||||
|
||||
qint64 QBenchmarkTickMeasurer::stop()
|
||||
{
|
||||
CycleCounterTicks now = getticks();
|
||||
|
@ -26,7 +26,6 @@ public:
|
||||
virtual ~QBenchmarkMeasurerBase() = default;
|
||||
virtual void init() {}
|
||||
virtual void start() = 0;
|
||||
virtual qint64 checkpoint() = 0;
|
||||
virtual qint64 stop() = 0;
|
||||
virtual bool isMeasurementAccepted(qint64 measurement) = 0;
|
||||
virtual int adjustIterationCount(int suggestion) = 0;
|
||||
|
@ -495,14 +495,6 @@ void QBenchmarkPerfEventsMeasurer::start()
|
||||
::ioctl(fd, PERF_EVENT_IOC_ENABLE);
|
||||
}
|
||||
|
||||
qint64 QBenchmarkPerfEventsMeasurer::checkpoint()
|
||||
{
|
||||
::ioctl(fd, PERF_EVENT_IOC_DISABLE);
|
||||
qint64 value = readValue();
|
||||
::ioctl(fd, PERF_EVENT_IOC_ENABLE);
|
||||
return value;
|
||||
}
|
||||
|
||||
qint64 QBenchmarkPerfEventsMeasurer::stop()
|
||||
{
|
||||
// disable the counter
|
||||
|
@ -26,7 +26,6 @@ public:
|
||||
~QBenchmarkPerfEventsMeasurer();
|
||||
void init() override;
|
||||
void start() override;
|
||||
qint64 checkpoint() override;
|
||||
qint64 stop() override;
|
||||
bool isMeasurementAccepted(qint64 measurement) override;
|
||||
int adjustIterationCount(int suggestion) override;
|
||||
|
@ -25,7 +25,6 @@ class QBenchmarkTimeMeasurer : public QBenchmarkMeasurerBase
|
||||
{
|
||||
public:
|
||||
void start() override;
|
||||
qint64 checkpoint() override;
|
||||
qint64 stop() override;
|
||||
bool isMeasurementAccepted(qint64 measurement) override;
|
||||
int adjustIterationCount(int sugestion) override;
|
||||
@ -42,7 +41,6 @@ class QBenchmarkTickMeasurer : public QBenchmarkMeasurerBase
|
||||
{
|
||||
public:
|
||||
void start() override;
|
||||
qint64 checkpoint() override;
|
||||
qint64 stop() override;
|
||||
bool isMeasurementAccepted(qint64 measurement) override;
|
||||
int adjustIterationCount(int) override;
|
||||
|
@ -170,18 +170,13 @@ void QBenchmarkCallgrindMeasurer::start()
|
||||
CALLGRIND_ZERO_STATS;
|
||||
}
|
||||
|
||||
qint64 QBenchmarkCallgrindMeasurer::checkpoint()
|
||||
qint64 QBenchmarkCallgrindMeasurer::stop()
|
||||
{
|
||||
CALLGRIND_DUMP_STATS;
|
||||
const qint64 result = QBenchmarkValgrindUtils::extractLastResult();
|
||||
return result;
|
||||
}
|
||||
|
||||
qint64 QBenchmarkCallgrindMeasurer::stop()
|
||||
{
|
||||
return checkpoint();
|
||||
}
|
||||
|
||||
bool QBenchmarkCallgrindMeasurer::isMeasurementAccepted(qint64 measurement)
|
||||
{
|
||||
Q_UNUSED(measurement);
|
||||
|
@ -41,7 +41,6 @@ class QBenchmarkCallgrindMeasurer : public QBenchmarkMeasurerBase
|
||||
{
|
||||
public:
|
||||
void start() override;
|
||||
qint64 checkpoint() override;
|
||||
qint64 stop() override;
|
||||
bool isMeasurementAccepted(qint64 measurement) override;
|
||||
int adjustIterationCount(int) override;
|
||||
|
Loading…
Reference in New Issue
Block a user