fhucho fhucho - 3 months ago 57
Android Question

Measure Android app startup time

What is the most precise way to measure startup time of an Android app?

By startup time I mean the difference between 2. and 3. :


  1. The app process is not running

  2. User clicks on app icon in the launcher

  3. Main Activity is fully initialized



So I basically need to somehow get time elapsed since JVM started and log it.

Answer

Check in adb shell in below manner.

adb shell
adb logcat -b events | grep am_activity_launch_time

[Output]
01-01 12:32:53.469 1236 1262 I am_activity_launch_time: 
    [0,205360373,com.sec.android.app.clockpackage/.ClockPackage,378,**378**,0]

Remarks:
Launch time for Clock is 378ms.
Comments