1*56b170dbSXin Li# Trebuchet 2*56b170dbSXin Li 3*56b170dbSXin LiTrebuchet 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. 4*56b170dbSXin Li 5*56b170dbSXin Li## Library 6*56b170dbSXin Li 7*56b170dbSXin LiThe code for the Trebuchet library can be found in the `core/` directory. 8*56b170dbSXin Li 9*56b170dbSXin Li## Bundled Programs 10*56b170dbSXin Li 11*56b170dbSXin LiTrebuchet comes bundled with several programs for analyzing one or more trace files. 12*56b170dbSXin Li 13*56b170dbSXin Li### Startup Analyzer 14*56b170dbSXin Li 15*56b170dbSXin LiThe 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. 16*56b170dbSXin Li 17*56b170dbSXin Li### Startup Summarizer 18*56b170dbSXin Li 19*56b170dbSXin LiThe 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. 20*56b170dbSXin Li 21*56b170dbSXin Li## Helper Scripts 22*56b170dbSXin Li 23*56b170dbSXin LiThe `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. 24