Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
res/values/ | 23-Mar-2024 | - | 4 | 3 | ||
src/com/android/google/experimental/svcmoniter/ | 23-Mar-2024 | - | 210 | 186 | ||
Android.bp | D | 23-Mar-2024 | 154 | 8 | 7 | |
AndroidManifest.xml | D | 23-Mar-2024 | 627 | 22 | 18 | |
README | D | 23-Mar-2024 | 1,006 | 28 | 21 |
README
1This Android service measures CPU usage of a program and an underlying system service it relies on. 2An example of this would be an android app XYZ communicates to some other device via Bluetooth. The 3SvcMonitor service can monitor the CPU usage of XYZ and com.android.bluetooth. 4 5Usage: 6 7To start the service: 8$ adb shell am startservice -a start \ 9-e java XYZ -e hal com.android.bluetooth \ 10com.google.android.experimental.svcmonitor/.SvcMonitor 11 12To stop the service: 13$ adb shell am startservice -a stop \ 14com.google.android.experimental.svcmonitor/.SvcMonitor 15 16To stop the service config: 17$ adb shell am startservice -a change \ 18-e java NewName -e hal NewService \ 19com.google.android.experimental.svcmonitor/.SvcMonitor 20 21To monitor the data: 22$ adb logcat | grep XYZ 23 24Options: 25-e java NameOfProgram: any running process’s name. 26-e hal NameOfSysService: name of the system service the previous process relies on. 27--ei period: period between each measurement (frequency). Unit: ms, Default:1000, Min: 100 28