Now that you have seen an example Performance Advisor report, you can use it with your own application.
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 Android device as per previous instructions .
Open a terminal or command prompt, and navigate to the Arm Mobile Studio
install directory. Therein, 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 see all available options, use:
python3 streamline_me.py --help
See the Get started with Performance Advisor Tutorial for full instructions.
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.
Leave the script running (do not close terminal).
In Streamline, click on Start capture
to start capturing profile data from the target.
Start the application on the device, and interact as desired for the profiling run you wish to do.
When satisfied, click on Stop capture
. Note the location where the captured data is stored.
Return to your terminal, and terminate the streamline_me.py
script.
In the terminal window, navigate to the stored data folder. List contents with dir
or ls
depending on host. The Streamline data will be in a .apc
directory.
Run Performance Advisor
on the appropriate folder to generate the report which can then be opened with any browser. 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 stored data folder. List contents with dir
or ls
depending on host. The Streamline data will be in a .apc
directory.
Run Performance Advisor on the appropriate folder 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.