AtraceCollector
public
class
AtraceCollector
extends BaseDeviceMetricCollector
java.lang.Object | ||
↳ | com.android.tradefed.device.metric.BaseDeviceMetricCollector | |
↳ | com.android.tradefed.device.metric.AtraceCollector |
在测试期间运行 atrace 并收集结果,并将其记录到调用中的 IMetricCollector
。
摘要
公共构造函数 | |
---|---|
AtraceCollector()
|
公共方法 | |
---|---|
void
|
onTestEnd(DeviceMetricData testData,
测试用例结束时的回调。 |
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,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 |
onTestStart
public void onTestStart (DeviceMetricData testData)
测试用例启动时的回调。
参数 | |
---|---|
testData |
DeviceMetricData :用于存储测试用例数据的 DeviceMetricData 。 |
抛出 | |
---|---|
DeviceNotAvailableException |
受保护的方法
fullLogPath
protected String fullLogPath ()
返回 | |
---|---|
String |
startTracing
protected void startTracing (ITestDevice device)
参数 | |
---|---|
device |
ITestDevice |
抛出 | |
---|---|
DeviceNotAvailableException |
stopTracing
protected void stopTracing (ITestDevice device)
参数 | |
---|---|
device |
ITestDevice |
抛出 | |
---|---|
DeviceNotAvailableException |