|
|
Profiling is important in measuring performance and resource usage in the shell.
|
|
|
|
|
|
## QML Profiling
|
|
|
|
|
|
[Qt Creator](https://www.qt.io/product/development-tools) contains a useful profiler for QML components.
|
|
|
|
|
|
To profile the shell on device, ensure that the device can be accessed with SSH.
|
|
|
|
|
|
In Qt Creator, go to `Tools->Options` and then click on the `Devices` tab on the left sidebar.
|
|
|
|
|
|
Click on `Add...` and select `Generic Linux Device`. Then add your device SSH details as follows and click `Apply`.
|
|
|
|
|
|
![image](uploads/0aee3d886b864fffea8653b6e2f3483e/image.png)
|
|
|
|
|
|
Now, we need to add a kit for the device. Click on the `Kits` tab on the left sidebar, and click `Add`.
|
|
|
|
|
|
Simply select your created device, enter a name, and press `Apply`.
|
|
|
|
|
|
![image](uploads/524d6f490009b3d1709562af11c03b00/image.png)
|
|
|
|
|
|
Then, on the device over SSH run the following command to run the shell with debugging enabled:
|
|
|
|
|
|
```bash
|
|
|
$ PLASMA_ENABLE_QML_DEBUG=1 plasmashell -p org.kde.plasma.phoneshell -qmljsdebugger=port:3678 --replace
|
|
|
```
|
|
|
|
|
|
In order to attach to the device and do profiling, go to `Analyze->QML Profiler (Attach to Waiting Application)`. Then select the kit you have created, as follows:
|
|
|
|
|
|
<img src="uploads/91c12e91d132f5474a1f877dbd189e14/image.png" width=400px/>
|
|
|
|
|
|
You will see the QML profiler popup on the bottom of the IDE. Read more about using the profiler [in the official documentation](https://doc.qt.io/qtcreator/creator-qml-performance-monitor.html).
|
|
|
|
|
|
## Profiling
|
|
|
|
|
|
TODO https://github.com/KDAB/hotspot
|
|
|
|
|
|
---
|
|
|
|
|
|
<img src="uploads/96e75cf814db872023d5a4b13c505d2a/image.png" width=150px/> |