Configure CI commands
Here are the continuous integration workflow steps for performance analysis using Arm Mobile Studio. Use a CI tool such as Jenkins, TeamCity, 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).
- 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.
- Generate a headless Streamline capture and supply the configuration file you generated for this device:
--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 useFor the full list of available command-line options refer to The lwi_me.py script options in the Performance Advisor user guide.
--overwriteto overwrite an earlier headless output.
- Add a wait period of at least 1 minute, to allow the script time to run.
- 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:
- Add an appropriate wait period to allow time for your testcase to run.
- Stop the script and exit the app:
adb -s <device_serial_number> shell am force-stop <app.package.name>
- Generate Performance Advisor reports in HTML and JSON formats.
pa <capture_filename.apc> -p <app.package.name> -d <output_directory>For the full list of available command-line options refer to The pa command in the Performance Advisor user guide.
- Push the HTML reports to a centrally visible location for your team to analyze each day.
- 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>.jsonNote: 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.