Profiling App Startup Time in Android Apps

87 Views Asked by At

https://developer.android.com/topic/performance/vitals/launch-time#app-startup-perfetto

I am trying to profile my app startup time.

It tells me "In Perfetto, find the row with the Android App Startups derived metric." Perfetto example

Only problem is: There is NO row with the Android App Startups derived metric. My perfetto trace

It says "If you don't see it, try capturing a trace using the on-device system tracing app."

I DID capture the trace using the on-device system tracing app. What might be missing from the instructions are some sort of settings I need to use to make it appear. Or was my app startup so stealthy that it wasn't detected? I'm trying to trace the application startup before adding an appwidget.

1

There are 1 best solutions below

0
On

1st. kill the app you want to trace

  1. run trace cmd

3.stop the cmd ,or use -t parameter (-t N trace for N seconds [default 5]) make sure N is longer than time of startup.

here is my my command atrace -b 10000 -z gfx input view wm am res sched freq idle mmc binder_driver binder_lock dalvik ss -t 20 > /data/local/tmp/some.trace