Bug: 113163668

Clone this repo:
  1. aa46c6d Empty merge of Android 24Q2 Release (ab/11526283) to aosp-main-future by Xin Li · 7 weeks ago main master
  2. 8b91684 Migrate Test Targets to New Android Ownership Model am: bcadc466d9 am: 7bb76427e2 by Aditya Choudhary · 4 months ago
  3. 7bb7642 Migrate Test Targets to New Android Ownership Model am: bcadc466d9 by Aditya Choudhary · 4 months ago
  4. bcadc46 Migrate Test Targets to New Android Ownership Model by Aditya Choudhary · 5 months ago
  5. e7fe996 [automerger skipped] Merge Android 12 QPR3 ab/8391262 am: f1d510cca0 -s ours am: c13941a760 -s ours am: 911ce8903f -s ours am: 61d279991b -s ours am: 9ff3c1fd3e -s ours by Xin Li · 2 years, 3 months ago android14-d2-release android14-d2-s1-release android14-d2-s2-release android14-d2-s3-release android14-d2-s4-release android14-d2-s5-release android14-dev android14-mainline-healthfitness-release android14-qpr1-release android14-qpr1-s2-release android14-qpr2-release android14-qpr2-s1-release android14-qpr2-s2-release android14-qpr2-s3-release android14-qpr2-s4-release android14-qpr2-s5-release aml_cfg_341510000 aml_hef_341114030 aml_hef_341311010 aml_hef_341415040 aml_hef_341512030 aml_hef_341613000 aml_hef_341717050 aml_rkp_341012000 aml_rkp_341015010 aml_rkp_341114000 aml_rkp_341311000 aml_rkp_341510000 android-14.0.0_r16 android-14.0.0_r17 android-14.0.0_r18 android-14.0.0_r19 android-14.0.0_r20 android-14.0.0_r21 android-14.0.0_r22 android-14.0.0_r23 android-14.0.0_r24 android-14.0.0_r25 android-14.0.0_r26 android-14.0.0_r27 android-14.0.0_r29 android-14.0.0_r30 android-14.0.0_r31 android-14.0.0_r32 android-14.0.0_r33 android-14.0.0_r34 android-14.0.0_r35 android-14.0.0_r36 android-14.0.0_r37 android-14.0.0_r38 android-14.0.0_r39 android-14.0.0_r40 android-14.0.0_r41 android-14.0.0_r42 android-14.0.0_r43 android-14.0.0_r44 android-14.0.0_r45

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.