Now that you have seen an example Performance Advisor report, you can use it with your own application. Performance Advisor runs on a Streamline capture file, so the first step is to take a capture with Streamline. Streamline must capture extra frame data from the device, which Performance Advisor needs to generate a report. To capture the extra frame data, you must first run the provided Python script, streamline_me.py
.
This script does the following:
gatord
, which Streamline uses to collect counter data.Performance Advisor uses a Python script to connect to your device. You will need Python 3.6
or later installed on your host machine.
Build your application, and setup the Android device as described in Setup tasks .
Open a terminal or command prompt, navigate to the Arm Performance Studio
install directory and locate the streamline_me.py
script:
cd <installation_directory>/streamline/bin/android
Run the script, enabling frame boundaries, with:
python3 streamline_me.py --lwi-mode=counters
To capture the Vulkan API, you also need to include the --lwi-api=vulkan
option.
To see all available options, use python3 streamline_me.py --help
The script returns a numbered list of the Android package names for the debuggable applications that are installed on your device. Enter the number of the application you want to profile.
Searching for devices:
RZ8MC03VVEW / SM-A505FN found
Select a device:
Auto-selected RZ8MC03VVEW / SM-A505FN
Searching for debuggable packages:
5 debuggable packages found
Select a debuggable packages:
1) com.Arm.DarkArms
2) com.UnityTechnologies.BoatAttack
3) com.arm.malideveloper.openglessdk.occlusionculling
4) com.arm.pa.paretrace
5) com.sample.texturedteapot
0) Exit script
The script identifies the GPU in the device, installs the daemon application and layer library, then waits for you to complete the capture in Streamline.
Leave the terminal window open, as you need to come back to it after the capture is complete, to stop the script. When the script ends, any captured screenshots are saved to the directory you specified, and the daemon application and layer library are uninstalled from the device. Do not unplug the device until the script has ended.
See the Get started with Performance Advisor Tutorial for full instructions.
Open Streamline and select the device and application on the Start
tab.
Click Start capture
to start capturing profile data from the target. Enter a name and location for the capture file that Streamline creates.
The application starts automatically on the device. Interact with the application as required.
When you have collected enough data, click the Stop capture
button.
Return to your terminal, and press ENTER
to terminate the streamline_me.py
script.
In the terminal window, navigate to the location where you stored the Streamline capture file (.apc
).
Run Streamline’s streamline-cli
command with the -pa
option on the Streamline capture file to generate the report. The default name is report.html
.
streamline-cli -pa <options> my_capture.apc
The available options are documented in the Performance Advisor User Guide , else can be seen with:
streamline-cli -pa -h
They can also be passed within an options file .
This feature is particularly useful when used within a CI workflow .
In the terminal window, navigate to the location where you stored the Streamline capture file (.apc
).
Run Streamline’s streamline-cli
command with the -pa
and --type=json
options on the Streamline capture file to generate the report (named report.json
in below):
streamline-cli -pa --type=json:report.json <other_options> my_capture.apc
You can specify a performance budget which will be reflected in the Performance Advisor report. For more information, refer to the Performance Advisor User Guide section on performance budgets.