Someone recently asked on Zhihu: “How to calculate APK startup time?”
“How can I use Python or direct ADB commands to calculate APK startup time? I want to measure the time from clicking the icon to the APK being fully started. For example, in a game, this would be from the icon tap to entering the login screen. Existing methods like
adb shell am start -WprovideThisTimeandTotalTime, but I’m unsure of the difference and they don’t seem to match visual reality.”
My colleague Guo Qifa and I answered different parts of the question. With his permission, I put our answers together here: partly so I could find them again, and partly to make them easier for other developers to find outside Zhihu.