转载自 https://blog.csdn.net/xiaomaoxiao336368/article/details/83547318
1.响应
冷启动 首次启动APP的时间间隔
adb shell am start -W com.netease.vopen/com.netease.vopen.activity.WelcomeActivity
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.netease.vopen/.activity.WelcomeActivity }Status: okActivity: com.netease.vopen/.activity.WelcomeActivityThisTime: 1723TotalTime: 1723CompleteC:\Users\hyzhang\Downloads\android-sdk_r24.4.1-windows\android-sdk-windows\build
-tools\28.0.3>adb shell am start -W -n com.netease.vopen/com.netease.vopen.activity.WelcomeActivityStarting: Intent { cmp=com.netease.vopen/.activity.WelcomeActivity }Status: okActivity: com.netease.vopen/.activity.WelcomeActivityThisTime: 1535TotalTime: 1535Complete-n 使用组件名方式启动
-W 等待应用完成启动
热启动:非首次启动APP的时间间隔,按back按键后再启
adb shell am start -W -n com.netease.vopen/com.netease.vopen.activity.WelcomeActivity
Starting: Intent { cmp=com.netease.vopen/.activity.WelcomeActivity }Status: okActivity: com.netease.vopen/.activity.WelcomeActivityThisTime: 99TotalTime: 99Complete测试标准:冷启动时间不超过1.5s,热启动时间不超过1s
内存 adb shell dumpsys meminfo com.netease.vopen
CPU
>adb shell
$ top -s cpu | grep com.netease.vopen$ top -m cpu | grep com.netease.vopen
adb shell
$ dumpsys cpuinfo | grep com.netease.vopen