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,

This script does the following:

  • Temporarily installs a daemon application on your device, called gatord, which Streamline uses to collect counter data.
  • Temporarily installs the OpenGL ES or Vulkan layer library file on your device, which is needed to collect frame data.
  • Enables you to specify options for the capture, such as whether to collect screenshots when the FPS drops below a certain threshold.

Before you begin

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 .

Connect to the device

  1. Open a terminal or command prompt, navigate to the Arm Performance Studio install directory and locate the script:

                cd <installation_directory>/streamline/bin/android
  2. Run the script, enabling frame boundaries, with:

                python3 --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 --help

  1. 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
     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.

  2. 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.

Capture data with Streamline

  1. Open Streamline and select the device and application on the Start tab.

  2. Click Start capture to start capturing profile data from the target. Enter a name and location for the capture file that Streamline creates.

  3. The application starts automatically on the device. Interact with the application as required.

  4. When you have collected enough data, click the Stop capture button.

  5. Return to your terminal, and press ENTER to terminate the script.

Generate an HTML performance report

  1. In the terminal window, navigate to the location where you stored the Streamline capture file (.apc).

  2. 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 .

Generate a JSON performance report

This feature is particularly useful when used within a CI workflow .

  1. In the terminal window, navigate to the location where you stored the Streamline capture file (.apc).

  2. 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

Performance budgets

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.