我有两个版本的Android,我在设备上进行测试,两者在AOSP中的服务都不同。我想进行某种基准测试,看看新系统服务消耗了多少RAM和CPU使用率。我不确定如何开始。是否有任何实现相同的基准测试?如果不是,我应该如何处理这种情况。
感谢任何帮助
答案 0 :(得分:0)
您可以通过
运行我的一些CPU和内存基准测试(免费,无添加)http://www.roylongbottom.org.uk/android%20benchmarks.htm
此外,您可以从Google Play安装Android终端模拟器,并使用Linux命令top或vmstat来监控所使用的资源(至少它们可以在我的平板电脑上运行)。
以下是运行我的一个基准测试时vmstat的详细信息。
Command vmstat -d 1 -n 60 > /mnt/extsd/vmst3.txt
For 60 samples of one second to txt file on external SD card
via path as identified by the df command
Command cat /mnt/extsd/vmst3.txt to display details
Start this, switch to main display, execute MemSpeed.apk that uses up
to 65 MB over nearly 11 seconds (starts in 16 seconds after a bit of
fiddling that uses some system CPU time). Note free memory reduction
and 99% CPU utilisation for 10+ seconds. Idle time is clearly wrong.
procs memory system cpu
r b free mapped anon slab in cs flt us ni sy id wa ir
0 0 909092 124948 197812 17600 365 554 0 3 0 2 99 0 0
1 0 906052 124704 200544 17600 2176 3162 0 21 0 27 99 0 0
0 0 905968 125700 200660 17596 1175 4000 0 15 0 21 99 0 0
0 0 905968 125716 200672 17596 286 397 0 1 0 2 99 0 0
0 0 905968 125716 200672 17596 1528 1226 0 5 0 6 99 0 0
0 0 905160 124944 201276 17596 1533 4771 0 30 0 31 99 0 0
0 0 905224 124944 201288 17596 349 460 0 3 0 4 99 0 0
0 0 904588 125440 201984 17596 2721 6542 0 32 0 30 99 0 0
0 0 903844 124964 202820 17596 2266 3569 0 25 0 17 99 0 0
3 0 903720 126456 202860 17596 1924 6185 0 37 0 37 99 0 0
1 0 897768 126504 202228 17596 2281 3661 0 29 0 20 99 0 0
0 0 894296 134684 202308 17596 1437 4258 0 18 0 21 99 0 0
0 0 894296 134700 202308 17596 521 631 0 4 0 7 99 0 0
1 0 894296 134700 202308 17596 300 420 0 1 0 3 99 0 0
0 0 894296 134700 202308 17596 320 417 0 0 0 4 99 0 0
2 0 846820 142512 205780 17596 2273 3369 0 38 0 37 99 0 0
0 0 846764 142492 205836 17616 1044 3101 0 23 0 21 99 0 0
1 0 838960 142492 205804 17616 1661 974 0 49 0 8 99 0 0
1 0 838960 142500 205908 17616 540 464 0 99 0 0 99 0 0
1 0 838836 142504 205924 17616 515 444 0 99 0 0 98 0 0
procs memory system cpu
r b free mapped anon slab in cs flt us ni sy id wa ir
1 0 838836 142504 205960 17616 521 442 0 99 0 1 99 0 0
1 0 838712 142504 206140 17616 458 348 0 99 0 0 99 0 0
1 0 838464 142504 206392 17616 479 373 0 99 0 0 99 0 0
1 0 837968 142504 206900 17616 598 646 0 99 0 1 99 0 0
1 0 834992 142504 209900 17616 688 772 0 99 0 2 96 0 0
1 0 823088 142504 221928 17616 500 484 0 98 0 4 97 0 0
1 0 774852 142504 269888 17616 447 366 0 95 0 6 97 0 0
1 0 774852 142504 269900 17616 391 315 0 99 0 1 98 0 0
0 0 774852 142504 269900 17616 401 477 0 51 0 4 99 0 0
0 0 774728 142504 269932 17616 231 240 0 0 0 1 99 0 0
0 0 774728 142504 269932 17616 219 239 0 0 0 0 99 0 0
0 0 774728 142504 269932 17616 214 243 0 0 0 1 99 0 0
0 0 774728 142504 269932 17616 196 222 0 0 0 0 99 0 0
0 0 797028 144488 270676 17616 2621 6371 0 40 1 35 99 0 0
0 0 797092 144560 270768 17612 466 801 0 1 0 7 99 0 0
1 0 796564 146172 271020 17648 1548 1657 0 14 0 7 99 0 0
1 0 796500 144044 271088 17648 1157 2890 0 10 0 12 99 0 0
0 0 796564 144044 271096 17648 367 503 0 2 0 4 99 0 0
0 0 796564 144044 271096 17648 343 438 0 2 0 4 99 0 0
0 0 796564 144044 271096 17648 275 348 0 3 0 3 99 0 0
procs memory system cpu
r b free mapped anon slab in cs flt us ni sy id wa ir
0 0 796564 144044 271096 17648 227 274 0 0 0 1 99 0 0
0 0 796564 144044 271096 17648 300 363 0 2 0 2 99 0 0
0 0 796564 144044 271096 17648 273 344 0 1 0 1 99 0 0
0 0 796564 144044 271096 17648 238 284 0 0 0 2 99 0 0
0 0 796564 144044 271096 17648 311 344 0 3 0 5 99 0 0
1 0 796564 144044 271096 17648 246 289 0 1 0 0 99 0 0
1 0 796564 144044 271096 17648 263 322 0 2 0 2 99 0 0
0 0 796564 144044 271096 17648 275 335 0 2 0 2 99 0 0
0 0 796564 144044 271096 17648 442 460 0 1 0 4 99 0 0
0 0 796564 144044 271096 17648 451 417 0 3 0 7 99 0 0
0 0 796564 144044 271096 17648 284 345 0 2 0 1 99 0 0
0 0 796564 144044 271096 17648 310 375 0 1 0 2 99 0 0
0 0 796564 144044 271096 17648 278 339 0 1 0 2 99 0 0
0 0 796564 144044 271100 17648 282 350 0 2 0 1 99 0 0
0 0 796564 144044 271100 17648 242 284 0 2 0 2 99 0 0
0 0 796564 144044 271100 17648 293 352 0 1 0 2 99 0 0
0 0 796564 144044 271100 17648 343 511 0 8 0 2 99 0 0
0 0 796564 144044 271120 17648 198 221 0 0 0 1 99 0 0
0 0 796564 144044 271120 17648 227 263 0 0 0 0 99 0 0
0 0 796564 144044 271120 17648 230 246 0 1 0 2 99 0 0