From d8ad5161509d5fe58e67621a3deb48651e57b270 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Wed, 9 May 2012 16:43:53 +1000 Subject: 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 Reviewed-by: Jason McDonald --- src/testlib/qbenchmarkmetric.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/testlib/qbenchmarkmetric.h') 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 }; } -- cgit v1.2.3