IPostProcessor

public interface IPostProcessor
implements ITestInvocationListener, ILogSaverListener, IDisableable

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 processAllTestMetrics(ListMultimap<String, MetricMeasurement.Metric> allTestMetrics)

Implement this method to aggregate test metrics.

abstract processRunMetrics( rawMetrics)

Implement this method in order to generate a set of new metrics from the existing one.

abstract processTestMetrics(TestDescription testDescription, testMetrics)

Implement this method to process metrics 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

processAllTestMetrics

public abstract  processAllTestMetrics (ListMultimap<String, MetricMeasurement.Metric> allTestMetrics)

Implement this method to aggregate test metrics.

Parameters
allTestMetrics ListMultimap: A HashMultimap storing the metrics from each test grouped by metric names.

Returns
The set of newly generated metrics from all test metrics.

processRunMetrics

public abstract  processRunMetrics ( rawMetrics)

Implement this method in order to generate a set of new metrics from the existing one. 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.

Returns
The set of newly generated metrics from the run metrics.

processTestMetrics

public abstract  processTestMetrics (TestDescription testDescription, 
                 testMetrics)

Implement this method to process metrics from each test.

Parameters
testDescription TestDescription: The TestDescription object describing the test.

testMetrics : The set of metrics from the test.

Returns
The set of newly generated metrics from the test metrics.