adb shell 查看内存信息

1.根据包名来查看指定的APP指定数据
adb shell "top | grep com.xxx.xxx"

由于这样打印出来的数据没有参数名,可以参考这个命令来看:adb shell top  -m 5

其中vss是虚拟耗用内存,rss实际使用物理内存

2.把打印的数据存到本地

adb shell "top -d 2 | grep com.yy.huanju" > g:cpu.txt(每2秒打印一次数据)

到G盘就可以找到对应的文件了

这是打印的数据:

3.为了方便把数据导入excel里面:

(手动加表名……)

把内存数据做成折线图:

    

原文地址:https://www.cnblogs.com/Qliupeng/p/9550461.html