IResourceMetricCollector

public interface IResourceMetricCollector

com.android.tradefed.monitoring.collector.IResourceMetricCollector


用戶實現自定義資源收集器的接口。

概括

公共方法

default long getDeviceMetricizeTimeoutMs ()

獲取以毫秒為單位的設備度量超時。

default getDeviceResourceMetrics ( DeviceDescriptor descriptor, IDeviceManager deviceManager)

收集設備資源指標。

default long getHostMetricizeTimeoutMs ()

獲取以毫秒為單位的主機度量超時。

default getHostResourceMetrics ()

收集主機資源指標。

公共方法

getDeviceMetricizeTimeoutMs

public long getDeviceMetricizeTimeoutMs ()

獲取以毫秒為單位的設備度量超時。

退貨
long

獲取設備資源指標

public  getDeviceResourceMetrics (DeviceDescriptor descriptor, 
                IDeviceManager deviceManager)

收集設備資源指標。該函數必須在getDeviceMetricizeTimeoutMs()毫秒內返回,否則結果將被LabResourceDeviceMonitor刪除。另外,請在昂貴的操作之前檢查 Thread.currentThread().isInterrupted() 並立即返回。

參數
descriptor DeviceDescriptor :關於計量設備的DeviceDescriptor

deviceManager IDeviceManagerIDeviceManager實例。

退貨
設備ResourceERROR(/Collection)

getHostMetricizeTimeoutMs

public long getHostMetricizeTimeoutMs ()

獲取以毫秒為單位的主機度量超時。

退貨
long

getHostResourceMetrics

public  getHostResourceMetrics ()

收集主機資源指標。該函數必須在getHostMetricizeTimeoutMs()毫秒內返回,否則結果將被LabResourceDeviceMonitor刪除。另外,請在昂貴的操作之前檢查 Thread.currentThread().isInterrupted() 並立即返回。

退貨
主機ResourceERROR(/Collection)