LogcatTimingMetricCollector
public
class
LogcatTimingMetricCollector
extends BaseDeviceMetricCollector
java.lang.Object | ||
↳ | com.android.tradefed.device.metric.BaseDeviceMetricCollector | |
↳ | com.android.tradefed.device.metric.LogcatTimingMetricCollector |
A metric collector that collects timing information (e.g. user switch time) from logcat during one or multiple repeated tests by using given regex patterns to parse start and end signals of an event from logcat lines.
Summary
Public constructors | |
---|---|
LogcatTimingMetricCollector()
|
Public methods | |
---|---|
void
|
onTestEnd(DeviceMetricData testData,
Callback when a test case is ended. |
void
|
onTestFail(DeviceMetricData testData, TestDescription test)
Callback when a test case fails. |
void
|
onTestRunEnd(DeviceMetricData testData,
Callback when a test run is ended. |
void
|
onTestRunStart(DeviceMetricData testData)
Callback when a test run is started. |
void
|
onTestStart(DeviceMetricData testData)
Callback when a test case is started. |
Public constructors
LogcatTimingMetricCollector
public LogcatTimingMetricCollector ()
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 onTestStart(com.android.tradefed.device.metric.DeviceMetricData) . |
currentTestCaseMetrics |
: the current map of metrics passed to ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)) . |
onTestFail
public void onTestFail (DeviceMetricData testData, TestDescription test)
Callback when a test case fails.
Parameters | |
---|---|
testData |
DeviceMetricData : the DeviceMetricData holding the data for the test case. |
test |
TestDescription : the TestDescription of the test case in progress. |
onTestRunEnd
public void onTestRunEnd (DeviceMetricData testData,currentTestCaseMetrics)
Callback when a test run is ended. This should be the time for clean up.
Parameters | |
---|---|
testData |
DeviceMetricData : the DeviceMetricData holding the data for the run. Will be the same
object as during onTestRunStart(com.android.tradefed.device.metric.DeviceMetricData) . |
currentTestCaseMetrics |
: the current map of metrics passed to ERROR(/#testRunEnded(long,Map)) . |
onTestRunStart
public void onTestRunStart (DeviceMetricData testData)
Callback when a test run is started.
Parameters | |
---|---|
testData |
DeviceMetricData : the DeviceMetricData holding the data for the run. |
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 |