diff options
author | Chris Adams <christopher.adams@nokia.com> | 2012-05-09 16:43:53 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-21 00:58:12 +0200 |
commit | d8ad5161509d5fe58e67621a3deb48651e57b270 (patch) | |
tree | 44e69fef4b13d0c958c4ce238ec6c79a79cda3c0 /src/testlib/qbenchmarkmetric.h | |
parent | 78a4c46842975f23cd0d9518eca8b341abbda0b5 (diff) |
Add new benchmark metrics to testlib
QElapsedTimer provides nanosecond-resolution elapsed timing, which
allows for finer granularity benchmark reporting. Also, clients
may also wish to benchmark the memory usage of a particular component,
but no metric currently exists which matches that requirement.
This commit adds the WalltimeNanoseconds and BytesAllocated metrics
to meet these needs. It is intended for manual use by clients via
setBenchmarkResult() only.
Change-Id: Ib37ada374e265c857eda02d047d51d436618e4a7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'src/testlib/qbenchmarkmetric.h')
-rw-r--r-- | src/testlib/qbenchmarkmetric.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/testlib/qbenchmarkmetric.h b/src/testlib/qbenchmarkmetric.h index e8514a4394..a95cdeadc0 100644 --- a/src/testlib/qbenchmarkmetric.h +++ b/src/testlib/qbenchmarkmetric.h @@ -58,7 +58,9 @@ enum QBenchmarkMetric { WalltimeMilliseconds, CPUTicks, InstructionReads, - Events + Events, + WalltimeNanoseconds, + BytesAllocated }; } |