Atrace收集器

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, currentTestCaseMetrics, TestDescription test) onTestEnd ( DeviceMetricData testData, currentTestCaseMetrics, TestDescription test)

测试用例结束时的回调。

void onTestStart ( DeviceMetricData testData)

测试用例启动时的回调。

受保护的方法

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

公共构造函数

Atrace收集器

public AtraceCollector ()

公共方法

测试结束时

public void onTestEnd (DeviceMetricData testData, 
                 currentTestCaseMetrics, 
                TestDescription test)

测试用例结束时的回调。这应该是清理的时间。

参数
testData DeviceMetricData :保存测试用例数据的DeviceMetricData 。将与onTestStart(com.android.tradefed.device.metric.DeviceMetricData)期间的对象相同。

currentTestCaseMetrics :传递给ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map))的当前指标映射。

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

投掷
DeviceNotAvailableException

测试开始时

public void onTestStart (DeviceMetricData testData)

测试用例启动时的回调。

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

投掷
DeviceNotAvailableException

受保护的方法

完整日志路径

protected String fullLogPath ()

退货
String

获取日志类型

protected LogDataType getLogType ()

退货
LogDataType

开始追踪

protected void startTracing (ITestDevice device)

参数
device ITestDevice

投掷
DeviceNotAvailableException

停止追踪

protected void stopTracing (ITestDevice device)

参数
device ITestDevice

投掷
DeviceNotAvailableException