[android]android效能測試命令列篇
adb shell top — Returns the CPU info for all the Process IDs (PID)
adb shell dumpsys meminfo <PID> — Returns the memory info for the particular Process ID
adb shell procrank — Returns the PSS, RSS, VSS and USS for all the process IDs (PID)
adb shell cat /proc/cpuinfo — Returns the processor information of the emulator
adb shell cat /proc/meminfo — Returns the memory Info for all the process IDs (PID)
adb logcat — Returns the log messages, including GC
我將會用這些命令做出一些東西,形成記憶體曲線圖提供給測試協助判斷記憶體洩露問題。
Android has an interesting command called dumpsys to dump some system information. Even described on adb manual I think that some points should be reinforced. In order to get the complete status just run (will produce a large output):
adb shell dumpsys
Also you can apply filters to running services:
1 SurfaceFlinger
2 accessibility
3 account
4 activity
5 alarm
6 appwidget
7 audio
8 backup
9 battery
10 batteryinfo
11 bluetooth
12 bluetooth_a2dp
13 clipboard
14 connectivity
15 content
16 cpuinfo
17 device_policy
18 devicestoragemonitor
19 diskstats
20 dropbox
21 entropy
22 ethernet
23 hardware
24 input_method
25 iphonesubinfo
26 isms
27 keybar
28 location
29 media.audio_flinger
30 media.audio_policy
31 media.camera
32 media.player
33 meminfo
34 mount
35 netstat
36 network_management
37 notification
38 package
39 permission
40 phone
41 power
42 search
43 sensorservice
44 simphonebook
45 statusbar
46 telephony.registry
47 throttle
48 uimode
49 usagestats
50 vibrator
51 wallpaper
52 wifi
53 window
Some examples:
adb shell dumpsys wifi
adb shell dumpsys cpuinfo
I suggest you try other items on the list above and be creative using all the power of Unix pipes. Example, to get all memory allocated by each process you can do something like:
adb shell dumpsys meminfo | grep "allocated:" | awk '{total = total + $5}END{print total}'
工具倒是蠻好做的,各位大牛,你們覺得我1分鐘記錄一次相關資料最後形成曲線圖,在此期間該APP一直在做monkey測試,是否對測試有意義呢?
adb shell dumpsys meminfo <PID> — Returns the memory info for the particular Process ID
adb shell procrank — Returns the PSS, RSS, VSS and USS for all the process IDs (PID)
adb shell cat /proc/cpuinfo — Returns the processor information of the emulator
adb shell cat /proc/meminfo — Returns the memory Info for all the process IDs (PID)
adb logcat — Returns the log messages, including GC
我將會用這些命令做出一些東西,形成記憶體曲線圖提供給測試協助判斷記憶體洩露問題。
Android has an interesting command called dumpsys to dump some system information. Even described on adb manual I think that some points should be reinforced. In order to get the complete status just run (will produce a large output):
adb shell dumpsys
Also you can apply filters to running services:
1 SurfaceFlinger
2 accessibility
3 account
4 activity
5 alarm
6 appwidget
7 audio
8 backup
9 battery
10 batteryinfo
11 bluetooth
12 bluetooth_a2dp
13 clipboard
14 connectivity
15 content
16 cpuinfo
17 device_policy
18 devicestoragemonitor
19 diskstats
20 dropbox
21 entropy
22 ethernet
23 hardware
24 input_method
25 iphonesubinfo
26 isms
27 keybar
28 location
29 media.audio_flinger
30 media.audio_policy
31 media.camera
32 media.player
33 meminfo
34 mount
35 netstat
36 network_management
37 notification
38 package
39 permission
40 phone
41 power
42 search
43 sensorservice
44 simphonebook
45 statusbar
46 telephony.registry
47 throttle
48 uimode
49 usagestats
50 vibrator
51 wallpaper
52 wifi
53 window
Some examples:
adb shell dumpsys wifi
adb shell dumpsys cpuinfo
I suggest you try other items on the list above and be creative using all the power of Unix pipes. Example, to get all memory allocated by each process you can do something like:
adb shell dumpsys meminfo | grep "allocated:" | awk '{total = total + $5}END{print total}'
工具倒是蠻好做的,各位大牛,你們覺得我1分鐘記錄一次相關資料最後形成曲線圖,在此期間該APP一直在做monkey測試,是否對測試有意義呢?
相關文章
- App 效能測試揭祕 (Android 篇)APPAndroid
- App效能測試揭祕(Android篇)APPAndroid
- Android 效能測試之方向與框架篇Android框架
- [android]android自動化測試二之命令列建立AVDAndroid命令列
- [Traceview]android效能測試ViewAndroid
- [android]android自動化測試六之命令列編譯APKAndroid命令列編譯APK
- 效能測試 —— Jmeter 命令列詳細JMeter命令列
- [android]android自動化測試十四之dumpsys效能測試Android
- Android 效能測試——Heap Viewer 工具AndroidView
- Android 效能測試——Memory Monitor 工具Android
- android自動化測試六之命令列編譯APKAndroid命令列編譯APK
- Android效能測試——Allocation Tracker(Device Monitor)Androiddev
- [Android]開源效能測試工具antoolAndroid
- [android]android命令列截圖Android命令列
- Android 效能測試工具- Emmagee 2.0 釋出Android
- Gradle for Android 第六篇( 測試)GradleAndroid
- Android App效能評測分析-網路流量篇AndroidAPP
- 測試開發之效能篇-效能測試設計
- [Android] 效能獲取方式-轉自淘測試Android
- Android 命令列建立工程Android命令列
- Android命令Monkey壓力測試,詳解Android
- android測試常用的adb命令以及進行Monkey測試Android
- 效能測試專案篇
- fio 命令 測試IO效能
- 效能測試總結(二)---測試流程篇
- [android]android自動化測試Android
- 測試開發之效能篇-JMeter介面測試JMeter
- lua陣列操作效能測試陣列
- 【效能測試】效能測試各知識第1篇:效能測試大綱【附程式碼文件】
- 效能測試之入門篇
- Linux效能測試 pmap命令Linux
- Android App持續整合效能測試:啟動流量(1)AndroidAPP
- Android深度效能測試:功能決定現在,效能決定未來!Android
- Junit測試Android自動化測試Android
- Android - 單元測試Android
- android單元測試Android
- Android的Junit測試Android
- [Fuzz]Android模糊測試Android