summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestlog_p.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-25 15:55:31 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-13 16:38:43 +0000
commit9b6cd2764a1516f3f6a13f9c3379603fe0d563a7 (patch)
tree486b2333cd2775f9bebba3bbfb6494542a106230 /src/testlib/qtestlog_p.h
parentbba86a01c9828d03b1564984a08561d62686d329 (diff)
Testlib: Output function / total time along with crash dump.
Previously, only QXmlTestLogger had timers to take elapsed times and log them. Move those into class QTestLog for access by the loggers and output the times in the crash dump to make it easier to spot hangs/recursion crashes. Produces: QFATAL : foo() Received signal 11 Function time: 22ms Total time: 23ms A crash occurred in ... Function time: 24ms Total time: 26ms Task-number: QTBUG-47370 Change-Id: Ia530a63104087daffc9a15f68c15d93378b9407e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/testlib/qtestlog_p.h')
-rw-r--r--src/testlib/qtestlog_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h
index b4786b4904..b7e9d16ec3 100644
--- a/src/testlib/qtestlog_p.h
+++ b/src/testlib/qtestlog_p.h
@@ -110,6 +110,11 @@ public:
static void setInstalledTestCoverage(bool installed);
static bool installedTestCoverage();
+ static qint64 nsecsTotalTime();
+ static qreal msecsTotalTime() { return QTestLog::nsecsTotalTime() / 1000000.; }
+ static qint64 nsecsFunctionTime();
+ static qreal msecsFunctionTime() { return QTestLog::nsecsFunctionTime() / 1000000.; }
+
private:
QTestLog();
~QTestLog();