AtraceCollector

public class AtraceCollector
extends BaseDeviceMetricCollector

java.lang.Object
com.android.tradefed.device.metric.BaseDeviceMetricCollector
  com.android.tradefed.device.metric.AtraceCollector


一个 IMetricCollector,用于在测试期间运行 atrace,收集结果并将其记录 到调用中。

摘要

公共构造函数

AtraceCollector()

公共方法

void onTestEnd(DeviceMetricData testData, Map<String, MetricMeasurement.Metric> currentTestCaseMetrics, TestDescription test)

测试用例结束时的回调。

void onTestStart(DeviceMetricData testData)

测试用例开始时的回调。

受保护的方法

String fullLogPath()
LogDataType getLogType()
void startTracing(ITestDevice device)
void stopTracing(ITestDevice device)

公共构造函数

AtraceCollector

public AtraceCollector ()

公共方法

onTestEnd

public void onTestEnd (DeviceMetricData testData, 
                Map<String, MetricMeasurement.Metric> currentTestCaseMetrics, 
                TestDescription test)

测试用例结束时的回调。此时应执行清理操作。

参数
testData DeviceMetricData:用于保存测试用例数据的 DeviceMetricData。将与 onTestStart(DeviceMetricData) 期间的对象相同。

currentTestCaseMetrics Map:传递给 testEnded(TestDescription,Map) 的当前指标映射。

test TestDescription:正在进行的测试用例的 TestDescription

抛出
DeviceNotAvailableException

onTestStart

public void onTestStart (DeviceMetricData testData)

测试用例开始时的回调。

参数
testData DeviceMetricData:用于保存测试用例数据的 DeviceMetricData

抛出
DeviceNotAvailableException

受保护的方法

fullLogPath

protected String fullLogPath ()

返回
String

getLogType

protected LogDataType getLogType ()

返回
LogDataType

startTracing

protected void startTracing (ITestDevice device)

参数
device ITestDevice

抛出
DeviceNotAvailableException

stopTracing

protected void stopTracing (ITestDevice device)

参数
device ITestDevice

抛出
DeviceNotAvailableException