跟踪收集器

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 LogDataType getLogType ()

退貨
LogDataType

開始追踪

protected void startTracing (ITestDevice device)

參數
device ITestDevice

投擲
DeviceNotAvailableException

停止追踪

protected void stopTracing (ITestDevice device)

參數
device ITestDevice

投擲
DeviceNotAvailableException