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, currentTestCaseMetrics, TestDescription test)

測試案例結束時的回呼。

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

getLogType

protected LogDataType getLogType ()

傳回
LogDataType

startTracing

protected void startTracing (ITestDevice device)

參數
device ITestDevice

擲回
DeviceNotAvailableException

stopTracing

protected void stopTracing (ITestDevice device)

參數
device ITestDevice

擲回
DeviceNotAvailableException