AtraceCollector

public class AtraceCollector
extends BaseDeviceMetricCollector

java.lang.Object
   ↳ com.android.tradefed.device.metric.BaseDeviceMetricCollector
     ↳ com.android.tradefed.device.metric.AtraceCollector


A IMetricCollector that runs atrace during a test and collects the result and log them to the invocation.

Summary

Public constructors

AtraceCollector()

Public methods

void onTestEnd(DeviceMetricData testData, currentTestCaseMetrics, TestDescription test)

Callback when a test case is ended.

void onTestStart(DeviceMetricData testData)

Callback when a test case is started.

Protected methods

String fullLogPath()
LogDataType getLogType()
void startTracing(ITestDevice device)
void stopTracing(ITestDevice device)

Public constructors

AtraceCollector

public AtraceCollector ()

Public methods

onTestEnd

public void onTestEnd (DeviceMetricData testData, 
                 currentTestCaseMetrics, 
                TestDescription test)

Callback when a test case is ended. This should be the time for clean up.

Parameters
testData DeviceMetricData: the DeviceMetricData holding the data for the test case. Will be the same object as during onTestStart(com.android.tradefed.device.metric.DeviceMetricData).

currentTestCaseMetrics : the current map of metrics passed to ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)).

test TestDescription: the TestDescription of the test case in progress.

Throws
DeviceNotAvailableException

onTestStart

public void onTestStart (DeviceMetricData testData)

Callback when a test case is started.

Parameters
testData DeviceMetricData: the DeviceMetricData holding the data for the test case.

Throws
DeviceNotAvailableException

Protected methods

fullLogPath

protected String fullLogPath ()

Returns
String

getLogType

protected LogDataType getLogType ()

Returns
LogDataType

startTracing

protected void startTracing (ITestDevice device)

Parameters
device ITestDevice

Throws
DeviceNotAvailableException

stopTracing

protected void stopTracing (ITestDevice device)

Parameters
device ITestDevice

Throws
DeviceNotAvailableException