adb 测试android 应用的启动时间
1.查看需要测试启动时间的app的包名和Activity名,在打开app的前提下输入
# windows :
adb shell dumpsys activity | findstr "mResume" 或者 adb shell dumps window windows | findstr "mFocusedApp"
# linux :
adb shell dumpsys activity | grep "mResume"


2 包名:com.tpshop.malls , Activity名:.activity.common.SPImagePreviewActivity
3.输入下面命令
adb shell am start -W -n com.tpshop.malls/.activity.common.SPImagePreviewActivity
结果如下:
我们需要关注的是ThistTime 和 Totaltime
Totaltime : 应用的启动时间,包括创建线程的时间、App初始化、Activity初始化到界面显示
本文来自博客园,作者:chuangzhou,转载请注明原文链接:https://www.cnblogs.com/czzz/p/15714749.html

浙公网安备 33010602011771号