From f341e99aab9393430b588f8824ecb64fb75583d2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 24 Oct 2022 17:49:49 -0700 Subject: QPlainTestLogger: don't print "RESULT" before each additional result We do that by passing the full list of results to the logger, to a virtual that is present in the base class to call the existing function. For all but the plain logger, we'll just print multiple results. The plain logger now prints: RESULT : tst_MyClass::QString_toInt() 383 nsecs per iteration (total: 3,837,324, iterations: 10000) 1,069 CPU cycles per iteration (total: 10,692,457, iterations: 10000) 3,123 instructions per iteration (total: 31,230,101, iterations: 10000) 536 branch instructions per iteration (total: 5,360,022, iterations: 10000) Change-Id: I3c79b7e08fa346988dfefffd17203cb5802693dd Reviewed-by: Qt CI Bot Reviewed-by: Fabian Kosmale --- src/testlib/qtestlog_p.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/testlib/qtestlog_p.h') diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h index 8852609d7a..9717858afb 100644 --- a/src/testlib/qtestlog_p.h +++ b/src/testlib/qtestlog_p.h @@ -63,7 +63,9 @@ public: static void addBXPass(const char *msg, const char *file, int line); static void addBXFail(const char *msg, const char *file, int line); static void addSkip(const char *msg, const char *file, int line); - static void addBenchmarkResult(const QBenchmarkResult &result); + static void addBenchmarkResult(const QList &result) + { return addBenchmarkResults({ result }); } + static void addBenchmarkResults(const QList &result); static void ignoreMessage(QtMsgType type, const char *msg); #ifndef QT_NO_REGULAREXPRESSION -- cgit v1.2.3