Files
frameworks_base/core/tests/SvcMonitor
Anton Hansson ab6ec61251 frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: I4233b9091d9066c4fa69f3d24aaf367ea500f760
2018-02-28 15:13:23 +00:00
..

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This Android service measures CPU usage of a program and an underlying system service it relies on.
An example of this would be an android app XYZ communicates to some other device via Bluetooth. The
SvcMonitor service can monitor the CPU usage of XYZ and com.android.bluetooth.

Usage:

To start the service:
$ adb shell am startservice -a start \
-e java XYZ -e hal com.android.bluetooth \
com.google.android.experimental.svcmonitor/.SvcMonitor

To stop the service:
$ adb shell am startservice -a stop \
com.google.android.experimental.svcmonitor/.SvcMonitor

To stop the service config:
$ adb shell am startservice -a change \
-e java NewName -e hal NewService \
com.google.android.experimental.svcmonitor/.SvcMonitor

To monitor the data:
$ adb logcat | grep XYZ

Options:
-e java NameOfProgram: any running processs name.
-e hal NameOfSysService: name of the system service the previous process relies on.
--ei period: period between each measurement (frequency). Unit: ms, Default:1000, Min: 100