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

getDeviceResourceMetrics

public  getDeviceResourceMetrics (DeviceDescriptor descriptor, 
                IDeviceManager deviceManager)

收集裝置資源指標。這個函式必須在 getDeviceMetricizeTimeoutMs() 毫秒內傳回,否則結果會是 捨棄 LabResourceDeviceMonitor。此外,也請參閱 Thread.currentThread().isInterrupted() 並立即傳回。

參數
descriptor DeviceDescriptor:有關指標化裝置的 DeviceDescriptor

deviceManager IDeviceManagerIDeviceManager 例項。

傳回
裝置 ERROR(/Collection) (Resource)。

getHostMetricizeTimeoutMs

public long getHostMetricizeTimeoutMs ()

取得主機指標化逾時 (以毫秒為單位)。

傳回
long

getHostResourceMetrics

public  getHostResourceMetrics ()

收集主機資源指標。這個函式必須在 getHostMetricizeTimeoutMs() 毫秒內傳回,否則結果會是 捨棄 LabResourceDeviceMonitor。此外,也請參閱 Thread.currentThread().isInterrupted() 並立即傳回。

傳回
主機 ResourceERROR(/Collection)