TraceCmdCollector

public class TraceCmdCollector
extends AtraceCollector

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


A IMetricCollector that collects traces during the test using trace-cmd, and logs them to the invocation.

This trace collector allows for USB disconnection during the test (as in power testing).

The system default tool, atrace, is used in tandem with this collector to set the android-specific sysfs flags.

A trace-cmd (https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git) binary compatible with Android must be specified.

This will upload the trace.dat format (see man 5 trace-cmd.dat) produced by trace-cmd.

Summary

Public constructors

TraceCmdCollector()

Protected methods

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

Public constructors

TraceCmdCollector

public TraceCmdCollector ()

Protected methods

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