IPostProcessor
public
interface
IPostProcessor
implements
IDisableable,
ILogSaverListener,
ITestInvocationListener
com.android.tradefed.postprocessor.IPostProcessor |
Post processors is a Trade Federation object meant to allow the processing of metrics and logs AFTER the tests and BEFORE result reporting. This allows to post-process some data and have all result_reporter objects receive it, rather than doing the post-processing inside only one result_reporter and having issue to pass the new data around.
Summary
Public methods | |
---|---|
abstract
ITestInvocationListener
|
init(ITestInvocationListener listener)
Initialization step of the post processor. |
abstract
|
processAllTestMetricsAndLogs(ListMultimap<String, MetricMeasurement.Metric> allTestMetrics,
Implement this method to aggregate metrics and logs across all tests. |
abstract
|
processRunMetricsAndLogs(
Implement this method in order to generate a set of new metrics from the existing metrics and logs. |
abstract
|
processTestMetricsAndLogs(TestDescription testDescription,
Implement this method to post process metrics and logs from each test. |
Public methods
init
public abstract ITestInvocationListener init (ITestInvocationListener listener)
Initialization step of the post processor. Ensured to be called before any of the tests callbacks.
Parameters | |
---|---|
listener |
ITestInvocationListener |
Returns | |
---|---|
ITestInvocationListener |
processAllTestMetricsAndLogs
public abstractprocessAllTestMetricsAndLogs (ListMultimap<String, MetricMeasurement.Metric> allTestMetrics, allTestLogs)
Implement this method to aggregate metrics and logs across all tests. Metrics coming out of this method will be reporter as run metrics. Only the newly generated metrics should be returned, and with unique key name (no collision with existing keys are allowed).
Parameters | |
---|---|
allTestMetrics |
ListMultimap : A HashMultimap storing the metrics from each test grouped by metric
names. |
allTestLogs |
: A map storing each test's map of log files keyed by their data names,
using the each test's TestDescription as keys. |
Returns | |
---|---|
|
The set of newly generated metrics from all test metrics. |
processRunMetricsAndLogs
public abstractprocessRunMetricsAndLogs ( rawMetrics, runLogs)
Implement this method in order to generate a set of new metrics from the existing metrics and logs. Only the newly generated metrics should be returned, and with unique key name (no collision with existing keys are allowed).
Parameters | |
---|---|
rawMetrics |
: The set of raw metrics available for the run. |
runLogs |
: The set of log files for the test run. |
Returns | |
---|---|
|
The set of newly generated metrics from the run metrics. |
processTestMetricsAndLogs
public abstractprocessTestMetricsAndLogs (TestDescription testDescription, testMetrics, testLogs)
Implement this method to post process metrics and logs from each test. Only the newly generated metrics should be returned, and with unique key name (no collision with existing keys are allowed).
Parameters | |
---|---|
testDescription |
TestDescription : The TestDescription object describing the test. |
testMetrics |
: The set of metrics from the test. |
testLogs |
: The set of files logged during the test. |
Returns | |
---|---|
|
The set of newly generated metrics from the test metrics. |