IResourceMetricCollector
public interface IResourceMetricCollector
com.android.tradefed.monitoring.collector.IResourceMetricCollector |
Giao diện để người dùng thực hiện các trình thu thập tài nguyên tùy chỉnh.
Bản tóm tắt
Phương thức công khai | |
---|---|
default long | getDeviceMetricizeTimeoutMs () Nhận thời gian chờ đo lường 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 () Nhận thời gian chờ đo lường của máy chủ tính bằng ms. |
default | getHostResourceMetrics () Thu thập số liệu tài nguyên máy chủ. |
Phương thức công khai
getDeviceMetricizeTimeoutMs
public long getDeviceMetricizeTimeoutMs ()
Nhận thời gian chờ đo lường thiết bị tính bằng mili giây.
trả lại | |
---|---|
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 thì kết quả sẽ bị xóa bởi LabResourceDeviceMonitor
. Ngoài ra, vui lòng kiểm tra Thread.currentThread().isInterrupted() trước khi thao tác tốn kém và quay lại ngay lập tức.
Thông số | |
---|---|
descriptor | DeviceDescriptor : DeviceDescriptor về thiết bị đo lường. |
deviceManager | IDeviceManager : phiên bản IDeviceManager . |
trả lại | |
---|---|
một ERROR(/Collection) của Resource thiết bị. |
getHostMetricizeTimeoutMs
public long getHostMetricizeTimeoutMs ()
Nhận thời gian chờ đo lường của máy chủ tính bằng ms.
trả lại | |
---|---|
long |
getHostResourceMetrics
publicgetHostResourceMetrics ()
Thu thập số liệu tài nguyên máy chủ. Hàm phải trả về sau getHostMetricizeTimeoutMs()
ms, nếu không thì kết quả sẽ bị xóa bởi LabResourceDeviceMonitor
. Ngoài ra, vui lòng kiểm tra Thread.currentThread().isInterrupted() trước khi thao tác tốn kém và quay lại ngay lập tức.
trả lại | |
---|---|
một ERROR(/Collection) của Resource máy chủ. |