Home | History | Annotate | only in /frameworks/base/core/tests/SvcMonitor
Up to higher level directory
NameDateSize
Android.mk21-Oct-2016323
AndroidManifest.xml21-Oct-2016627
README21-Oct-20161,006
res/21-Oct-2016
src/21-Oct-2016

README

      1 This Android service measures CPU usage of a program and an underlying system service it relies on.
      2 An example of this would be an android app XYZ communicates to some other device via Bluetooth. The
      3 SvcMonitor service can monitor the CPU usage of XYZ and com.android.bluetooth.
      4 
      5 Usage:
      6 
      7 To start the service:
      8 $ adb shell am startservice -a start \
      9 -e java XYZ -e hal com.android.bluetooth \
     10 com.google.android.experimental.svcmonitor/.SvcMonitor
     11 
     12 To stop the service:
     13 $ adb shell am startservice -a stop \
     14 com.google.android.experimental.svcmonitor/.SvcMonitor
     15 
     16 To stop the service config:
     17 $ adb shell am startservice -a change \
     18 -e java NewName -e hal NewService \
     19 com.google.android.experimental.svcmonitor/.SvcMonitor
     20 
     21 To monitor the data:
     22 $ adb logcat | grep XYZ
     23 
     24 Options:
     25 -e java NameOfProgram: any running processs 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