Bug: 113163668

Clone this repo:
  1. 9ff3c1f [automerger skipped] Merge Android 12 QPR3 ab/8391262 am: f1d510cca0 -s ours am: c13941a760 -s ours am: 911ce8903f -s ours am: 61d279991b -s ours by Xin Li · 10 months ago main-16k-with-phones master
  2. 61d2799 [automerger skipped] Merge Android 12 QPR3 ab/8391262 am: f1d510cca0 -s ours am: c13941a760 -s ours am: 911ce8903f -s ours by Xin Li · 10 months ago
  3. 911ce89 [automerger skipped] Merge Android 12 QPR3 ab/8391262 am: f1d510cca0 -s ours am: c13941a760 -s ours by Xin Li · 10 months ago android13-dev main-16k t_frc_ase_330444010 t_frc_odp_330442000
  4. c13941a [automerger skipped] Merge Android 12 QPR3 ab/8391262 am: f1d510cca0 -s ours by Xin Li · 10 months ago
  5. f1d510c Merge Android 12 QPR3 ab/8391262 by Xin Li · 10 months ago

Trebuchet

Trebuchet is a Kotlin library for parsing and analyzing Android trace files generated by the atrace or systrace commands. This is not an officially supported Google product.

Library

The code for the Trebuchet library can be found in the core/ directory.

Bundled Programs

Trebuchet comes bundled with several programs for analyzing one or more trace files.

Startup Analyzer

The Startup Analyzer program takes a trace file, detects any startup events that occurred during the traced time period, and prints information about the events. If Trebuchet is built using the Android build system, there will be a StartupAnalyzerKt program placed into a directory that is a member of the PATH system variable. If you wish to use Gradle, you can use the startup-analyzer.sh script located in the scripts/ directory.

Startup Summarizer

The Startup Summarizer program takes a set of trace files, detects startup events in each file, and computes average and standard deviation for startup stats, broken down by program name, compiler filter, and cache status. If Trebuchet is built using the Android build system, there will be a StartupSummarizerKt program placed into a directory that is a member of the PATH system variable. If you wish to use Gradle, you can use the startup-summarizer.sh script located in the scripts/ directory.

Helper Scripts

The scripts/ directory contains a shell script called run-startup.sh, which will start a trace, launch an activity given a package name and an activity name, transfer the trace file to the host machine, and run the StartupAnalyzer.