AtraceRunMetricCollector

public class AtraceRunMetricCollector
extends FilePullerDeviceMetricCollector

java.lang.Object
   ↳ com.android.tradefed.device.metric.BaseDeviceMetricCollector
     ↳ com.android.tradefed.device.metric.FilePullerDeviceMetricCollector
       ↳ com.android.tradefed.device.metric.AtraceRunMetricCollector


Collects the traces from all the test directory under the given directory from the test device, log the test directory and post process the trace files under the test directory and aggregate the metrics.

Summary

Public constructors

AtraceRunMetricCollector()

Public methods

void onTestEnd(DeviceMetricData testData, currentTestCaseMetrics)

Callback when a test case is ended.

void processMetricDirectory(String key, File metricDirectory, DeviceMetricData runData)

Implementation of the method should allow to log the directory, parse it for metrics to be put in DeviceMetricData.

void processMetricFile(String key, File metricFile, DeviceMetricData runData)

Implementation of the method should allow to log the file, parse it for metrics to be put in DeviceMetricData.

Public constructors

AtraceRunMetricCollector

public AtraceRunMetricCollector ()

Public methods

onTestEnd

public void onTestEnd (DeviceMetricData testData, 
                 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 BaseDeviceMetricCollector.onTestStart(com.android.tradefed.device.metric.DeviceMetricData).

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

processMetricDirectory

public void processMetricDirectory (String key, 
                File metricDirectory, 
                DeviceMetricData runData)

Implementation of the method should allow to log the directory, parse it for metrics to be put in DeviceMetricData.

Parameters
key String: the option key associated to the directory that was pulled.

metricDirectory File: the ERROR(/File) pulled from the device matching the option key.

runData DeviceMetricData: the DeviceMetricData where metrics can be stored.

processMetricFile

public void processMetricFile (String key, 
                File metricFile, 
                DeviceMetricData runData)

Implementation of the method should allow to log the file, parse it for metrics to be put in DeviceMetricData.

Parameters
key String: the option key associated to the file that was pulled.

metricFile File: the ERROR(/File) pulled from the device matching the option key.

runData DeviceMetricData: the DeviceMetricData where metrics can be stored.