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 |
獲取設備資源指標
publicgetDeviceResourceMetrics (DeviceDescriptor descriptor, IDeviceManager deviceManager)
收集設備資源指標。該功能必須在返回getDeviceMetricizeTimeoutMs()
毫秒,否則結果將被丟棄LabResourceDeviceMonitor
。另外,請在昂貴的操作之前檢查 Thread.currentThread().isInterrupted() 並立即返回。
參數 | |
---|---|
descriptor | DeviceDescriptor :在DeviceDescriptor 有關metricizing設備。 |
deviceManager | IDeviceManager :在IDeviceManager 實例。 |
退貨 | |
---|---|
一個ERROR(/Collection) 設備的Resource 。 |
getHostMetricizeTimeoutMs
public long getHostMetricizeTimeoutMs ()
以毫秒為單位獲取主機度量超時。
退貨 | |
---|---|
long |
獲取主機資源指標
publicgetHostResourceMetrics ()
收集主機資源指標。該功能必須在返回getHostMetricizeTimeoutMs()
毫秒,否則結果將被丟棄LabResourceDeviceMonitor
。另外,請在昂貴的操作之前檢查 Thread.currentThread().isInterrupted() 並立即返回。
退貨 | |
---|---|
一個ERROR(/Collection) 的主機的Resource 。 |