跟踪收集器
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, 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) |
公共构造函数
跟踪收集器
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 |
onTestStart
public void onTestStart (DeviceMetricData testData)
测试用例启动时的回调。
参数 | |
---|---|
testData | DeviceMetricData :保存测试用例数据的DeviceMetricData 。 |
投掷 | |
---|---|
DeviceNotAvailableException |
受保护的方法
完整日志路径
protected String fullLogPath ()
退货 | |
---|---|
String |
开始追踪
protected void startTracing (ITestDevice device)
参数 | |
---|---|
device | ITestDevice |
投掷 | |
---|---|
DeviceNotAvailableException |
停止追踪
protected void stopTracing (ITestDevice device)
参数 | |
---|---|
device | ITestDevice |
投掷 | |
---|---|
DeviceNotAvailableException |