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, Map<String, MetricMeasurement.Metric> currentTestCaseMetrics)

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, 
                Map<String, MetricMeasurement.Metric> currentTestCaseMetrics)

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(DeviceMetricData).

currentTestCaseMetrics Map: the current map of metrics passed to ITestLifeCycleReceiver.testEnded(TestDescription, Map).

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.

Protected methods

fullLogPath

protected String fullLogPath ()

Returns
String

getLogType

protected LogDataType getLogType ()

Returns
LogDataType

startTracing

protected void startTracing (ITestDevice device)

Parameters
device ITestDevice

stopTracing

protected void stopTracing (ITestDevice device)

Parameters
device ITestDevice