-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
Motivation
As a developer and tester, I would like to capture and save QML profiler data during the execution of the application
Potential use-cases
- Tester downloaded and installed the latest QML-based application on his device: desktop, mobile, or car
- Tester observed a performance issue and would like to collect QML profiler traces
- Instead of attaching qmlprofiler to the app process, the tester performs some "secret" action to initiate capturing of qml profiler data
- The application code initiates the capturing of qml profiler data during the next XX seconds
- After the timeout, the app saves the data on a disk
Proposal
Extend QQmlEngine API
class QQmlEngine { public: ... #if QT_CONFIG(qml_debug) void captureProfiledData(int msec, const QString& filePath); #endif }
Example of usage
// somewhere in my code connect(&app, MyApp::profileDataRequested, this, [] (){ // collect qmlprofile data during next 60 seconds // and save it on a disk qmlEngine()->captureProfiledData(60000, QStringLiteral("/tmp/traces.qzt")); })