diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-10-21 12:39:37 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-11-09 02:18:45 -0700 |
commit | 4731baf6d3a18857e86cc16de000bc42e84bf6de (patch) | |
tree | c81e80bbe29a995952b16ee284777ed33884b3ca /src/testlib/qbenchmarkmeasurement_p.h | |
parent | b5b00e77906af0ebc848d9244fab816bd1c9afcc (diff) |
QBenchlib: add support for a measurer reporting multiple results
Implemented for the Linux Perf measurer, with four measurements by
default.
RESULT : tst_MyClass::QString_toInt():
149.574444 CPU cycles per iteration (total: 149,574,445, iterations: 1000000)
RESULT : tst_MyClass::QString_toInt():
620.000181 instructions per iteration (total: 620,000,182, iterations: 1000000)
RESULT : tst_MyClass::QString_toInt():
131.000046 branch instructions per iteration (total: 131,000,047, iterations: 1000000)
RESULT : tst_MyClass::QString_toInt():
32.118771 nsecs per iteration (total: 32,118,771, iterations: 1000000)
Change-Id: I3c79b7e08fa346988dfefffd17202cda3df8431b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/testlib/qbenchmarkmeasurement_p.h')
-rw-r--r-- | src/testlib/qbenchmarkmeasurement_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/testlib/qbenchmarkmeasurement_p.h b/src/testlib/qbenchmarkmeasurement_p.h index 459a1d5c90..56b978228b 100644 --- a/src/testlib/qbenchmarkmeasurement_p.h +++ b/src/testlib/qbenchmarkmeasurement_p.h @@ -16,6 +16,7 @@ // #include <QtTest/qbenchmark.h> +#include <QtCore/qlist.h> #include <QtCore/private/qglobal_p.h> QT_BEGIN_NAMESPACE @@ -31,7 +32,7 @@ public: virtual ~QBenchmarkMeasurerBase() = default; virtual void init() {} virtual void start() = 0; - virtual Measurement stop() = 0; + virtual QList<Measurement> stop() = 0; virtual bool isMeasurementAccepted(Measurement m) = 0; virtual int adjustIterationCount(int suggestion) = 0; virtual int adjustMedianCount(int suggestion) = 0; |