DeviceUtilStatsMonitor
public
class
DeviceUtilStatsMonitor
extends Object
implements
IDeviceMonitor
java.lang.Object | |
↳ | com.android.tradefed.device.DeviceUtilStatsMonitor |
A IDeviceMonitor
that calculates device utilization stats.
Summary
Nested classes | |
---|---|
enum |
DeviceUtilStatsMonitor.StubDeviceUtil
Enum for configuring treatment of stub devices when calculating average host utilization |
class |
DeviceUtilStatsMonitor.UtilizationDesc
Container for utilization stats. |
Public constructors | |
---|---|
DeviceUtilStatsMonitor()
|
Public methods | |
---|---|
DeviceUtilStatsMonitor.UtilizationDesc
|
getUtilizationStats()
Get the device utilization up to the last 24 hours |
void
|
notifyDeviceStateChange(String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
Listens to device state changes and records time that device transitions from or to available or allocated state. |
void
|
run()
A method that will be called after all of the Monitor's @Option fields have been set. |
void
|
setDeviceLister(IDeviceMonitor.DeviceLister lister)
Allows the |
void
|
stop()
A method that will be called when the Monitor need to be stopped. |
Public constructors
DeviceUtilStatsMonitor
public DeviceUtilStatsMonitor ()
Public methods
getUtilizationStats
public DeviceUtilStatsMonitor.UtilizationDesc getUtilizationStats ()
Get the device utilization up to the last 24 hours
Returns | |
---|---|
DeviceUtilStatsMonitor.UtilizationDesc |
notifyDeviceStateChange
public void notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
Listens to device state changes and records time that device transitions from or to available or allocated state.
Parameters | |
---|---|
serial |
String |
oldState |
DeviceAllocationState |
newState |
DeviceAllocationState |
run
public void run ()
A method that will be called after all of the Monitor's @Option fields have been set.
setDeviceLister
public void setDeviceLister (IDeviceMonitor.DeviceLister lister)
Allows the DeviceLister
to be set. After a successful attempt to set the Lister,
implementations may discard all subsequent attempts.
Parameters | |
---|---|
lister |
IDeviceMonitor.DeviceLister |
stop
public void stop ()
A method that will be called when the Monitor need to be stopped.
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-10-02 UTC.