IResourceMetricCollector
  public
  
  
  
  interface
  IResourceMetricCollector
  
  
  
| com.android.tradefed.monitoring.collector.IResourceMetricCollector | 
The interface for user to implement customized resource collectors.
Summary
| Public methods | |
|---|---|
| 
        
        default
        
        
        
        long | 
      getDeviceMetricizeTimeoutMs()
      Gets the device metricize timeout in ms. | 
| 
        
        default
        
        
        
         | 
      getDeviceResourceMetrics(DeviceDescriptor descriptor, IDeviceManager deviceManager)
      Collects device resource metrics. | 
| 
        
        default
        
        
        
        long | 
      getHostMetricizeTimeoutMs()
      Gets the host metricize timeout in ms. | 
| 
        
        default
        
        
        
         | 
      getHostResourceMetrics()
      Collects host resource metrics. | 
Public methods
getDeviceMetricizeTimeoutMs
public long getDeviceMetricizeTimeoutMs ()
Gets the device metricize timeout in ms.
| Returns | |
|---|---|
| long | |
getDeviceResourceMetrics
publicgetDeviceResourceMetrics (DeviceDescriptor descriptor, IDeviceManager deviceManager) 
Collects device resource metrics. The function must return in 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: theDeviceDescriptorabout the metricizing device. | 
| deviceManager | IDeviceManager: theIDeviceManagerinstance. | 
| Returns | |
|---|---|
|  | a ERROR(/Collection)of deviceResource. | 
getHostMetricizeTimeoutMs
public long getHostMetricizeTimeoutMs ()
Gets the host metricize timeout in ms.
| Returns | |
|---|---|
| long | |
getHostResourceMetrics
publicgetHostResourceMetrics () 
Collects host resource metrics. The function must return in getHostMetricizeTimeoutMs() ms, otherwise the result will be
 dropped by the LabResourceDeviceMonitor. Also, please check
 Thread.currentThread().isInterrupted() before expensive operation and return immediately.
| Returns | |
|---|---|
|  | a ERROR(/Collection)of hostResource. | 
