After googled this topic, I know there are several ways to measure the startup time of an android app.
- adb logcat -b events | grep am_activity_launch_time, see this post
- adb logcat -s ActivityManager:I | grep Displayed
- use reportFullyDrawn programmatically
- adb shell screenrecord --bugreport /sdcard/launch.mp4, to check video frame by frame, see this post
- adb shell am start -w packagename/MainActivity to check the output
- adb logcat -s Timeline:I, to checkout "App_transition_ready" and Activity_windows_visible in the output.
What is the most precise way to measure startup time of an Android app? What are the differences among them?