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 void startTracing (ITestDevice device)
參數 | |
---|---|
device | ITestDevice |
投擲 | |
---|---|
DeviceNotAvailableException |
停止追蹤
protected void stopTracing (ITestDevice device)
參數 | |
---|---|
device | ITestDevice |
投擲 | |
---|---|
DeviceNotAvailableException |