DeviceStorageAgeResourceMetricCollector
public
class
DeviceStorageAgeResourceMetricCollector
extends Object
implements
IResourceMetricCollector
| java.lang.Object | |
| ↳ | com.android.tradefed.monitoring.collector.DeviceStorageAgeResourceMetricCollector |
Parse storage age from logcat. The storaged must been enabled for this collector. Please check before you use this collector, otherwise it will return empty resources.
Summary
Constants | |
|---|---|
String |
AGE_TAG
|
String |
LIFE_A_TAG
|
String |
LIFE_B_TAG
|
String |
STORAGE_AGE_CMD_FORMAT
|
String |
STORAGE_AGE_RESOURCE_NAME
|
Fields | |
|---|---|
public
static
final
Pattern |
STORAGE_AGE_PATTERN
|
Public constructors | |
|---|---|
DeviceStorageAgeResourceMetricCollector()
|
|
Public methods | |
|---|---|
Collection<Resource>
|
getDeviceResourceMetrics(DeviceDescriptor descriptor, IDeviceManager deviceManager)
Collects device resource metrics. |
Constants
AGE_TAG
public static final String AGE_TAG
Constant Value: "age"
LIFE_A_TAG
public static final String LIFE_A_TAG
Constant Value: "lifeTimeA"
LIFE_B_TAG
public static final String LIFE_B_TAG
Constant Value: "lifeTimeB"
STORAGE_AGE_CMD_FORMAT
public static final String STORAGE_AGE_CMD_FORMAT
Constant Value: "logcat -b events -d -t "%d-%02d-%02d %02d:%02d:00.000" | grep storaged_emmc_info | tail -1"
STORAGE_AGE_RESOURCE_NAME
public static final String STORAGE_AGE_RESOURCE_NAME
Constant Value: "storage_age"
Fields
STORAGE_AGE_PATTERN
public static final Pattern STORAGE_AGE_PATTERN
Public constructors
DeviceStorageAgeResourceMetricCollector
public DeviceStorageAgeResourceMetricCollector ()
Public methods
getDeviceResourceMetrics
public Collection<Resource> getDeviceResourceMetrics (DeviceDescriptor descriptor, IDeviceManager deviceManager)
Collects device resource metrics. The function must return in IResourceMetricCollector.getDeviceMetricizeTimeoutMs() ms, otherwise the result will be
dropped by the LabResourceDeviceMonitor. Also, please check
Thread.currentThread().isInterrupted() before expensive operation and return immediately.
| Parameters | |
|---|---|
descriptor |
DeviceDescriptor: the DeviceDescriptor about the metricizing device. |
deviceManager |
IDeviceManager: the IDeviceManager instance. |
| Returns | |
|---|---|
Collection<Resource> |
a Collection of device Resource. |