IResourceMetricCollector
public interface IResourceMetricCollector
com.android.tradefed.monitoring.collector.IResourceMetricCollector |
Giao diện cho người dùng triển khai bộ thu thập tài nguyên tùy chỉnh.
Bản tóm tắt
Phương pháp công khai | |
---|---|
default long | getDeviceMetricizeTimeoutMs () Cho phép thời gian chờ metricize thiết bị tính bằng mili giây. |
default | getDeviceResourceMetrics ( DeviceDescriptor descriptor, IDeviceManager deviceManager) Thu thập số liệu tài nguyên thiết bị. |
default long | getHostMetricizeTimeoutMs () Cho phép máy chủ lưu trữ metricize thời gian chờ tính bằng mili giây. |
default | getHostResourceMetrics () Thu thập số liệu tài nguyên máy chủ. |
Phương pháp công khai
getDeviceMetricizeTimeoutMs
public long getDeviceMetricizeTimeoutMs ()
Cho phép thời gian chờ metricize thiết bị tính bằng mili giây.
Lợi nhuận | |
---|---|
long |
getDeviceResourceMetrics
publicgetDeviceResourceMetrics (DeviceDescriptor descriptor, IDeviceManager deviceManager)
Thu thập số liệu tài nguyên thiết bị. Hàm phải trả về trong getDeviceMetricizeTimeoutMs()
ms, nếu không kết quả sẽ bị LabResourceDeviceMonitor
. Ngoài ra, hãy kiểm tra Thread.currentThread (). IsInterrupt () trước khi hoạt động tốn kém và quay lại ngay lập tức.
Thông số | |
---|---|
descriptor | DeviceDescriptor : DeviceDescriptor về thiết bị metrici hóa. |
deviceManager | IDeviceManager : phiên bản IDeviceManager . |
Lợi nhuận | |
---|---|
một ERROR(/Collection) của Resource thiết bị. |
getHostMetricizeTimeoutMs
public long getHostMetricizeTimeoutMs ()
Cho phép máy chủ lưu trữ metricize thời gian chờ tính bằng mili giây.
Lợi nhuận | |
---|---|
long |
getHostResourceMetrics
publicgetHostResourceMetrics ()
Thu thập số liệu tài nguyên máy chủ. Hàm phải trả về dưới getHostMetricizeTimeoutMs()
ms, nếu không kết quả sẽ bị LabResourceDeviceMonitor
. Ngoài ra, hãy kiểm tra Thread.currentThread (). IsInterrupt () trước khi hoạt động tốn kém và quay lại ngay lập tức.
Lợi nhuận | |
---|---|
một ERROR(/Collection) của Resource máy chủ. |