APP测试之内存命令查询

CPU占有率
           adb shell dumpsys cpuinfo :获取本机CPU占有率
           adb shell dumpsys  cpuinfo | findstr +包名  :获取应用的CPU占有率  

内存使用情况
          adb shell getprop | findstr dalvik :本机内存的使用情况
          adb shell dumpsys meminfo +包名:应用的内存使用情况
fps
      adb shell dumpsys gfxinfo +包名

 特别注意在windows电脑上,用findstr ;在苹果本上用grep   

打开被测app进行滑动页面,结束后在,命令行中输入adb shell dumpsys gfxinfo app的包名 >FPS.txt 回车,页面无任何提示则为成功

find过滤包名

如果直接用adb logcat,会将很多没用的一起加载,如果只想抓取被测app的日志,就需要对包名进行过滤,其命令如

原文地址:https://www.cnblogs.com/linyu51/p/13179009.html