[education/rkward] rkward/autotests: Get some better diagnostics on test-timing

Thomas Friedrichsmeier null at kde.org
Sun Oct 2 13:15:32 BST 2022


Git commit 4aeb95e4e57d73b65f61e4f07463f6d063f12fec by Thomas Friedrichsmeier.
Committed on 02/10/2022 at 12:15.
Pushed by tfry into branch 'master'.

Get some better diagnostics on test-timing

M  +4    -0    rkward/autotests/core_test.cpp

https://invent.kde.org/education/rkward/commit/4aeb95e4e57d73b65f61e4f07463f6d063f12fec

diff --git a/rkward/autotests/core_test.cpp b/rkward/autotests/core_test.cpp
index 636d248d..80758c48 100644
--- a/rkward/autotests/core_test.cpp
+++ b/rkward/autotests/core_test.cpp
@@ -27,7 +27,10 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include "../core/renvironmentobject.h"
 #include "../misc/rkcommonfunctions.h"
 
+QElapsedTimer _test_timer;
+
 void RKDebug (int, int, const char* fmt, ...) {
+	printf("%d: ", (int) _test_timer.elapsed());
 	va_list ap;
 	va_start(ap, fmt);
 	vprintf(fmt, ap);
@@ -98,6 +101,7 @@ private slots:
 		waitForAllFinished();
 	}
 	void initTestCase() {
+		_test_timer.start();
 		qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--no-sandbox"); // Allow test to be run as root, which, for some reason is being done on the SuSE CI.
 		QLoggingCategory::setFilterRules("qt.text.layout=false");  // Filter out some noise
 		KAboutData::setApplicationData(KAboutData("rkward", "RKWard", RKWARD_VERSION, "Frontend to the R statistics language", KAboutLicense::GPL)); // component name needed for .rc files to load


More information about the rkward-tracker mailing list