Configure CI commands

Here are the continuous integration workflow steps for performance analysis using Arm Mobile Studio. Use a CI tool such as JenkinsTeamCity, or Buildbot to send the following instructions to the host machine(s) for each device in your device farm.

Tip: To simplify these steps, we've provided a helper script that generates the headless Streamline capture and handles starting and stopping of the application (steps 2 to 6).

  1. Install your debuggable APK on each device, using Android Debug Bridge (ADB):
    adb -s <device_serial_number> install <app.package.name>
    Note: For devices running Android 9 or earlier, your APK must include the Arm interceptor library. Refer to Prepare your application for instructions on how to do this.
  2. Generate a headless Streamline capture and supply the configuration file you generated for this device:
    python3 lwi_me.py --lwi-gles-layer-lib-path <path_to_layer_lib> --daemon <path_to_gatord> --package <app.package.name> --headless <capture_filename.apc> --headless-timeout <secs> --config <path_to_config_file>

    You can use --overwrite to overwrite an earlier headless output.

    For the full list of available command-line options refer to The lwi_me.py script options in the Performance Advisor user guide.
  3. Add a wait period of at least 1 minute, to allow the script time to run.
  4. Start the app on the device:
    adb -s <device_serial_number> shell am start <app.package.name>
    If your app was built with Unity, you'll need to include the Unity player activity in <app.package.name>, for example:
    com.arm.mygame/com.unity3d.player.UnityPlayerActivity
  5. Add an appropriate wait period to allow time for your testcase to run.
  6. Stop the script and exit the app:
    adb -s <device_serial_number> shell am force-stop <app.package.name>
  7. Generate Performance Advisor reports in HTML and JSON formats.
    pa <capture_filename.apc> -p <app.package.name> -d <output_directory> -t html:<file_name.html>,json:<file_name>.json
    For the full list of available command-line options refer to The pa command in the Performance Advisor user guide.
  8. Push the HTML reports to a centrally visible location for your team to analyze each day.
  9. Push the JSON files to your chosen database and visualization tool such as ELK stack.
    curl -X POST "<Elasticsearch_location>/indexname/_bulk?pretty" -H 'Content-Type: application/x-ndjson' --data-binary @<file_name>.json
    Note: If you are planning to export your JSON files to Elasticsearch, and you're using Arm Mobile Studio version 2020.1 or earlier, you need to convert the file to the expected format first. Refer to our FAQ for instructions on how to do this.
Previous Next