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

取得主機資源指標

public  getHostResourceMetrics ()

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

退貨
主機ResourceERROR(/Collection)