[HOWTO] Benchmark App Startup

when building aosp, some of the buildlogs (build.trace.gz and ninja.log) can be loaded into perfetto - a trace viewer. Not useful for hourlong traces - but to profile short app startup and runtime behaviour it is helpful.

It really couldn’t be easier to create a trace, you can use Chromes WebUSB ability and adb to create it from the UI, or first enable a quick-tile that can be later easily tapped (developer-options → system trace → enable quick-tile) and

adb pull /data/local/traces/ .


(discord “cold” app startup on a moto-cedric at ~5sec, spends a lot of time with LayoutInflater)

3 Likes