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 | #include "Application.h" | 19 | #include "Application.h" |
| 20 | 20 | ||
| 21 | Q_LOGGING_CATEGORY(trace_test, "trace.test") | ||
| 22 | |||
| 21 | TestScriptingInterface* TestScriptingInterface::getInstance() { | 23 | TestScriptingInterface* TestScriptingInterface::getInstance() { |
| 22 | static TestScriptingInterface sharedInstance; | 24 | static TestScriptingInterface sharedInstance; |
| 23 | return &sharedInstance; | 25 | return &sharedInstance; |
| @@ -125,3 +127,10 @@ bool TestScriptingInterface::waitForCondition(qint64 maxWaitMs, std::function<bo · 101 unmodified lines | |||
| 125 | return condition(); | 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 | } | ||