ModulePerfettoCollector
public
class
ModulePerfettoCollector
extends BaseDeviceMetricCollector
| java.lang.Object | ||
| ↳ | com.android.tradefed.device.metric.BaseDeviceMetricCollector | |
| ↳ | com.android.tradefed.device.metric.ModulePerfettoCollector | |
Collector that will start perfetto trace when a test module start and end and device reboots.
Summary
Public constructors | |
|---|---|
ModulePerfettoCollector()
|
|
Public methods | |
|---|---|
boolean
|
captureModuleLevel()
|
boolean
|
isOnModuleLevel()
|
void
|
onTestModuleEnded()
Allows capturing the module ended event. |
void
|
onTestModuleStarted()
Allows capturing the module started event. |
void
|
onTestRunEnd(DeviceMetricData runData, Map<String, MetricMeasurement.Metric> currentRunMetrics)
Callback when a test run is ended. |
void
|
onTestRunFailed(DeviceMetricData runData, FailureDescription failure)
Callback for testRunFailed events |
void
|
onTestRunStart(DeviceMetricData runData)
Callback when a test run is started. |
void
|
rebootEnded(ITestDevice device)
Gets notification when the reboot ended in device. |
void
|
rebootStarted(ITestDevice device)
Gets notification when reboot started in device. |
Public constructors
ModulePerfettoCollector
public ModulePerfettoCollector ()
Public methods
captureModuleLevel
public boolean captureModuleLevel ()
| Returns | |
|---|---|
boolean |
|
isOnModuleLevel
public boolean isOnModuleLevel ()
| Returns | |
|---|---|
boolean |
|
onTestModuleEnded
public void onTestModuleEnded ()
Allows capturing the module ended event.
| Throws | |
|---|---|
DeviceNotAvailableException |
|
onTestModuleStarted
public void onTestModuleStarted ()
Allows capturing the module started event.
| Throws | |
|---|---|
DeviceNotAvailableException |
|
onTestRunEnd
public void onTestRunEnd (DeviceMetricData runData, Map<String, MetricMeasurement.Metric> currentRunMetrics)
Callback when a test run is ended. This should be the time for clean up.
| Parameters | |
|---|---|
runData |
DeviceMetricData: the DeviceMetricData holding the data for the run. Will be the same
object as during onTestRunStart(DeviceMetricData). |
currentRunMetrics |
Map: the current map of metrics passed to testRunEnded(long,Map). |
onTestRunFailed
public void onTestRunFailed (DeviceMetricData runData, FailureDescription failure)
Callback for testRunFailed events
| Throws | |
|---|---|
DeviceNotAvailableException |
|
onTestRunStart
public void onTestRunStart (DeviceMetricData runData)
Callback when a test run is started.
| Parameters | |
|---|---|
runData |
DeviceMetricData: the DeviceMetricData holding the data for the run. |
rebootEnded
public void rebootEnded (ITestDevice device)
Gets notification when the reboot ended in device.
NOTE: Receivers should avoid rebooting during this callback. Any reboot attempt will be ignored.
| Parameters | |
|---|---|
device |
ITestDevice: ITestDevice where the reboot ended. |
| Throws | |
|---|---|
DeviceNotAvailableException |
|
rebootStarted
public void rebootStarted (ITestDevice device)
Gets notification when reboot started in device.
NOTE: Receivers should avoid rebooting during this callback. Any reboot attempt will be ignored.
| Parameters | |
|---|---|
device |
ITestDevice: ITestDevice where the reboot started. |
| Throws | |
|---|---|
DeviceNotAvailableException |
|