To monitor the performance of an application in the QML Profiler:
Note: To profile applications on devices, you must install Qt 4.7.4 or later libraries on them.
Note: If data collection does not start automatically, select the (Enable Profiling) button.
When you start analyzing an application, the application is launched, and the QML Profiler immediately begins to collect data. This is indicated by the time running in the Elapsed field.
Data is collected until you select the (Stop) button. Data collection takes time, and therefore, there might be a delay before the data is displayed.
Do not use application commands to exit the application, because data is sent to the QML Profiler when you select the Stop button. The application continues to run for some seconds, after which it is stopped automatically. If you exit the application, the data is not sent.
Select the Disable Profiling button to disable the automatic start of the data collection when an application is launched. Data collection starts when you select the button again.
To save all the collected data, right-click any QML Profiler view to open the context menu, and then select Save QML Trace. To view the saved data, select Load QML Trace. You can also deliver the saved data to other developers for examination or load data saved by them.
To profile Qt Quick applications that are not launched by Qt Creator, select Analyze > QML Profiler (External). You must enable QML debugging for the application in the project build settings. For more information, see Setting Up QML Debugging.
In the QML Profiler dialog, Port field, specify the port to listen to.
The Timeline view displays graphical representations of:
Each row in the timeline (6) describes a type of QML events that were recorded. Move the cursor on an event on a row to see how long it takes and where in the source it is being called. To display the information only when an event is selected, disable the View Event Information on Mouseover button (5).
The outline (10) summarizes the period for which data was collected. Drag the zoom range (8) or click the outline to move on the outline. You can also move between events by selecting the Jump to Previous Event (1) and Jump to Next Event (2) buttons.
Select the Show Zoom Slider button (3) to open a slider that you can use to set the zoom level. You can also drag the zoom handles (9). To reset the default zoom level, right-click the timeline to open the context menu, and select Reset Zoom.
You can select an event range (7) to view the frame rate of events and to compare it with the frame rate of similar events. Select the Select Range button (4) to activate the selection tool. Then click in the timeline to specify the beginning of the event range. Drag the selection handle to define the end of the range. The length of the range indicates the frame rate of the event.
You can use event ranges also to measure delays between two subsequent events. Place a range between the end of the first event and the beginning of the second event. The Duration field displays the delay between the events in milliseconds.
To zoom into an event range, double-click it.
To remove an event range, close the Selection dialog.
On the Binding row, you can see when a binding is evaluated and how long the evaluation takes. Move the mouse over the binding for details about the binding: location in the source code, duration, and source code.
Click the binding to move the cursor in the code editor to the part of the code where the binding is called.
The Events view displays the number of times each binding is called and the time the calls take. This allows you to examine which events you need to optimize. A high number of calls might indicate that a binding is called unnecessarily. Click on a binding to move to it in the source code in the code editor.
The Callers and Callees panes show dependencies between events. They allow you to examine the internal functions of the application. The Callers pane summarizes the QML events that trigger a binding. This tells you what caused a change in a binding. The Callees pane summarizes the QML events that a binding triggers. This tells you which QML events are affected if you change a binding.
Click on a binding to move to it in the source code in the code editor.
When you select an event in the Timeline view, information about it is displayed in the Events view. To view an event range in the Events view, select Limit Events Pane to Current Range in the context menu in the Timeline view.
To copy the contents of one view or row to the clipboard, select Copy Table or Copy Row in the context menu.
You can view similar information about JavaScript events in the JavaScript view.
The QML JavaScript engine optimizes trivial bindings. The QML Profiler does not receive information about optimized bindings, and therefore, it displays the text <bytecode> and the message Source code not available in the Callers and Callees panes.
To inspect the optimized bindings, turn off the QML optimizer by setting the environment variable QML_DISABLE_OPTIMIZER to 1. To set the environment variable for the current project in the project settings: