Android System Resources Monitoring
Continuous Testing provides an API for monitoring device CPU, Memory, and Battery Usage.
- Our System Resources data is based on Google's Android Debug Bridge (adb) tool.
- For each type of resource, Continuous Testing can provide values both for the entire system and for a specific process.
- Continuous Testing provides both real-time monitoring graphs and API for automation tests that allow capturing the data during the test.
- All System Resources Monitoring are available for both non-instrumented and instrumented applications.
The following is a short explanation for each type of System Resources.
Memory
Continuous Testing provides CPU metrics data based on adb shell dumpsys meminfo
.
The result is the total Proportional Set Size (PSS) value.
That is the amount of RAM available to the system. RAM is used for other things like the frame buffer, window surfaces, etc.
Therefore, expect the value to be lower than the mentioned value in the device specifications.
CPU
Continuous Testing provides CPU metrics data based on adb shell dumpsys cpuinfo
.
The result is the value divided by the number device CPU cores, the returned value is a percentage between 0 to 100.
Battery Usage
Continuous Testing provides Battery Usage metrics data based on adb dumpsys batterystats
.
We provide data on the following parameters:
- cpu_power_use - Energy consumed by CPU's operations related to the application
- wifi_power_use - Energy consumed by the WiFi component
- gpu_power_use - Energy consumed by the GPU (screen consumption).
- rest_power_use - Energy consumed by all other components: sensors, bluetooth, cellular, etc...
- total_usage - Total of: cpu_power_use, wifi_power_use , gpu_power_use, and rest_power_use
- screen_power_use - Power consumed by the screen while the application was running in the foreground
The data is presented in mAh by default, but it can be also presented in percent (relatively to the full battery capacity).
- In some cases, adb does not provide battery usage information for one or more component (e.g WiFi) this could happens due to a specific Mobile Vendor or to the OS version. In that case, we return the value - N/A.
- All battery usage information that we collecting from adb tool are approximate power usage, there are some cases that older values are higher the new value. In that cases the differences are minor.