Background:
When I was doing the androidclient test. Sometimes it is necessary to monitor cpu/mem/power consumption/interface loading time/traffic and so on.
So we went up and down, netizens told me two solutions: Anothermonitor and Emmagee, before. I wrote a tool of my own, and I'll compare and explain the options below.
Anothermonitor and Emmagee are all in the form of apk. The following is the official website:
https://code.google.com/p/anothermonitor/
Https://github.com/NetEase/Emmagee
Look at the introduction:
Anothermonitor is a application for Android which monitors and records thememory and CPU usage values of the mob Ile phone. Thus, the program is intendedfor anyone whom would being interested in knowing the mobile resources state.
001.png
emmagee Function Description:
1. Check the current time measured usage of CPU usage and overall CPU usage
2. Detect the amount of memory used by the application at the current time, and the percentage of the total RAM occupied, the remaining amount
3. Detect the amount of traffic consumed by the application starting from start to current time
4. Test data is written to the CSV file. stored on the phone at the same time
5, can choose to open the floating window function, floating window real-time display measured application occupancy performance data information
6, in the floating window can be high-speed start or turn off the phone's WiFi network
002.png
Two tools more similar function, the latter one more traffic monitoring, the advantage is only need to install to the Android phone can be used, the disadvantage is that the program itself on the mobile phone resources are also affected, monitoring content is not rich enough.
I have written a tool for my own collection of resource parameters, relying mainly on the command line that comes with the phone.
The main use of the command: Getprop and Dumpsys
List of documents:
L Getdatav1.bat
L Getdatav2.bat
L android log analysis. xls
L Wireless ADB connects Android phones and computers. docx
Description
The first version number is the USB cable that connects the PC and the phone. BusyBox was installed after the root of the phone, so all kinds of commands are complete. So in getdatav1.sh you will find all Linux commands;
Second version number: Because most phones don't have BusyBox installed, there's no awk. SED a class of commands, so the getdatav1.sh changed to getdatav2.sh, once the awk, sed and other commands are no longer used. Use DOS batches for text processing.
The process of executing a program is to perform getdata.sh first. There are specific instructions for use in the document. Generate a whole bunch of data files from the collection, then open the Excel file, click Generate, load the data file of the previous batch collection into an Excel file, and generate the chart.
In the test process found that the USB cable connected to the PC, will cause the phone has been charging, so there is a wireless solution, to ensure the accurate power consumption.
May be able to support Monkeyrunner run for several hours. The number of crash and log are generated together into the report. This is more practical. Do it when you are free.
Download Link:
http://download.csdn.net/detail/testingba/7716309
Androidclient Performance Parameter Monitoring