DeviceBatteryResourceMetricCollector

public class DeviceBatteryResourceMetricCollector
extends Object implements IResourceMetricCollector

java.lang.Object
   ↳ com.android.tradefed.monitoring.collector.DeviceBatteryResourceMetricCollector


這個收集器會收集裝置電池指標。它會發出 ADB 殼層指令並剖析回應,其中的指標包括狀態、健康、等級、規模和溫度。

摘要

常數

float BATTERY_TEMP_DENOMINATOR

欄位

public static final String BATTERY_CMD

public static final Pattern BATTERY_PATTERN

public static final String BATTERY_RESOURCE_NAME

public static final String FIELD_GROUP

public static final String TEMPERATURE

public static final String VALUE_GROUP

公用建構函式

DeviceBatteryResourceMetricCollector()

公用方法

getDeviceResourceMetrics(DeviceDescriptor descriptor, IDeviceManager deviceManager)

取得裝置電池狀態。

常數

BATTERY_TEMP_DENOMINATOR

public static final float BATTERY_TEMP_DENOMINATOR

常數值: 10.0

欄位

BATTERY_CMD

public static final String BATTERY_CMD

BATTERY_PATTERN

public static final Pattern BATTERY_PATTERN

BATTERY_RESOURCE_NAME

public static final String BATTERY_RESOURCE_NAME

FIELD_GROUP

public static final String FIELD_GROUP

溫度

public static final String TEMPERATURE

VALUE_GROUP

public static final String VALUE_GROUP

公用建構函式

DeviceBatteryResourceMetricCollector

public DeviceBatteryResourceMetricCollector ()

公用方法

getDeviceResourceMetrics

public  getDeviceResourceMetrics (DeviceDescriptor descriptor, 
                IDeviceManager deviceManager)

取得裝置電池狀態。

參數
descriptor DeviceDescriptor:關於評估裝置的 DeviceDescriptor

deviceManager IDeviceManagerIDeviceManager 例項。

傳回
裝置 ResourceERROR(/Collection)