History

expose physics simulation stats to Test JS API

Andrew Meadows committed 8 years ago

Commit 25382041 parent 4540e9e7 files · +43 −5Browse files

Showing the changes to interface/src/scripting/TestScriptingInterface.cpp (1 of 7 files). Show all

Unified · Split

interface/src/scripting/TestScriptingInterface.cpp+4−0
@@ -141,6 +141,10 @@ void TestScriptingInterface::endTraceEvent(QString name) { · 140 unmodified lines
141 tracing::traceEvent(trace_test(), name, tracing::DurationEnd);141 tracing::traceEvent(trace_test(), name, tracing::DurationEnd);
142}142}
143 143
144void TestScriptingInterface::savePhysicsSimulationStats(QString filename) {
145 qApp->saveNextPhysicsStats(filename);
146}
147
144void TestScriptingInterface::profileRange(const QString& name, QScriptValue fn) {148void TestScriptingInterface::profileRange(const QString& name, QScriptValue fn) {
145 PROFILE_RANGE(script, name);149 PROFILE_RANGE(script, name);
146 fn.call();150 fn.call();