Bug: 113163668

Clone this repo:
  1. b735f44 Automated way to measure user switch time am: 2c4f274b54 am: 0c1d2a3f33 am: d2240446bb by Automerger Merge Worker · 1 year, 1 month ago android11-d1-b-release android11-d1-release android11-d1-s1-release android11-d1-s5-release android11-d1-s6-release android11-d1-s7-release android11-dev android11-mainline-release android11-mainline-sparse-2020-dec-release android11-qpr1-d-release android11-qpr1-d-s1-release android11-qpr1-release android11-qpr1-s1-release android11-qpr1-s2-release master android-11.0.0_r10 android-11.0.0_r11 android-11.0.0_r12 android-11.0.0_r13 android-11.0.0_r14 android-11.0.0_r15 android-11.0.0_r16 android-11.0.0_r18 android-11.0.0_r19 android-11.0.0_r20 android-11.0.0_r21 android-11.0.0_r22 android-11.0.0_r23 android-11.0.0_r24 android-11.0.0_r26 android-11.0.0_r27 android-11.0.0_r28 android-11.0.0_r7 android-11.0.0_r8 android-11.0.0_r9 android-mainline-11.0.0_r1 android-mainline-11.0.0_r2 android-mainline-11.0.0_r3 android-mainline-11.0.0_r4
  2. d224044 Automated way to measure user switch time am: 2c4f274b54 am: 0c1d2a3f33 by Automerger Merge Worker · 1 year, 1 month ago android-r-beta-2 android-r-beta-3 android-r-preview-2 android-r-preview-3 android-r-preview-4
  3. 0c1d2a3 Automated way to measure user switch time am: 2c4f274b54 by Mayank Garg · 1 year, 1 month ago
  4. 2c4f274 Automated way to measure user switch time by Mayank Garg · 1 year, 2 months ago android-r-preview-1
  5. 0006e50 Remove superfluous use of no_framework_libs: true am: 5d2df37457 am: 329561bf0d am: 4e2f58d473 by Paul Duffin · 1 year, 8 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.