Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-141185

As a developer, I would like to capture and save qml profiler data from the code

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • Some future release
    • None
    • QML: Tooling
    • 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 

      1. Tester downloaded and installed the latest QML-based application on his device: desktop, mobile, or car
      2. Tester observed a performance issue and would like to collect QML profiler traces
      3. Instead of attaching qmlprofiler to the app process, the tester performs some "secret" action to initiate capturing of qml profiler data
      4. The application code initiates the capturing of qml profiler data during the next XX seconds
      5. 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"));
      }) 

       

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtqmlteam Qt Qml Team User
            kmitrakhovich_luxoft Kirill Mitrakhovich
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes