Showing the changes to interface/src/scripting/TestScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -18,6 +18,8 @@ · 17 unmodified lines | ||
| 18 | 18 | |
| 19 | 19 | #include "Application.h" |
| 20 | 20 | |
| 21 | +Q_LOGGING_CATEGORY(trace_test, "trace.test") | |
| 22 | + | |
| 21 | 23 | TestScriptingInterface* TestScriptingInterface::getInstance() { |
| 22 | 24 | static TestScriptingInterface sharedInstance; |
| 23 | 25 | return &sharedInstance; |
| @@ -125,3 +127,10 @@ bool TestScriptingInterface::waitForCondition(qint64 maxWaitMs, std::function<bo · 101 unmodified lines | ||
| 125 | 127 | return condition(); |
| 126 | 128 | } |
| 127 | 129 | |
| 130 | +void TestScriptingInterface::startTraceEvent(QString name) { | |
| 131 | + tracing::traceEvent(trace_test(), name, tracing::DurationBegin, ""); | |
| 132 | +} | |
| 133 | + | |
| 134 | +void TestScriptingInterface::endTraceEvent(QString name) { | |
| 135 | + tracing::traceEvent(trace_test(), name, tracing::DurationEnd); | |
| 136 | +} | |