后处理器

public interface IPostProcessor
implements ITestInvocationListener , ILogSaverListener , IDisableable

com.android.tradefed.postprocessor.IPostProcessor


后处理器是一个 Trade Federation 对象,旨在允许在测试之后和结果报告之前处理指标和日志。这允许对一些数据进行后处理并让所有 result_reporter 对象接收它,而不是只在一个 result_reporter 中进行后处理并在传递新数据时遇到问题。

概括

公共方法

abstract ITestInvocationListener init ( ITestInvocationListener listener)

后处理器的初始化步骤。

abstract processAllTestMetricsAndLogs (ListMultimap<String, MetricMeasurement.Metric> allTestMetrics, allTestLogs) processAllTestMetricsAndLogs (ListMultimap<String, MetricMeasurement.Metric> allTestMetrics, allTestLogs)

实施此方法以聚合所有测试的指标和日志。

abstract processRunMetricsAndLogs ( rawMetrics, runLogs) processRunMetricsAndLogs ( rawMetrics, runLogs) processRunMetricsAndLogs ( rawMetrics, runLogs)

实施此方法以便从现有指标和日志生成一组新指标。

abstract processTestMetricsAndLogs ( TestDescription testDescription, testMetrics, testLogs) processTestMetricsAndLogs ( TestDescription testDescription, testMetrics, testLogs) processTestMetricsAndLogs ( TestDescription testDescription, testMetrics, testLogs)

实施此方法以发布每个测试的流程指标和日志。

公共方法

在里面

public abstract ITestInvocationListener init (ITestInvocationListener listener)

后处理器的初始化步骤。确保在任何测试回调之前被调用。

参数
listener ITestInvocationListener

退货
ITestInvocationListener

processAllTestMetricsAndLogs

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

实施此方法以聚合所有测试的指标和日志。来自此方法的指标将报告为运行指标。只应返回新生成的指标,并具有唯一的键名(不允许与现有键冲突)。

参数
allTestMetrics ListMultimap :一个 HashMultimap 存储每个测试的指标,按指标名称分组。

allTestLogs :存储每个测试的日志文件映射的映射,这些日志文件以每个测试的TestDescription作为键,以其数据名称为键。

退货
来自所有测试指标的一组新生成的指标。

processRunMetricsAndLogs

public abstract  processRunMetricsAndLogs ( rawMetrics, 
                 runLogs)

实施此方法以便从现有指标和日志生成一组新指标。只应返回新生成的指标,并具有唯一的键名(不允许与现有键冲突)。

参数
rawMetrics :可用于运行的原始指标集。

runLogs :测试运行的日志文件集。

退货
从运行指标中新生成的一组指标。

processTestMetricsAndLogs

public abstract  processTestMetricsAndLogs (TestDescription testDescription, 
                 testMetrics, 
                 testLogs)

实施此方法以发布每个测试的流程指标和日志。只应返回新生成的指标,并具有唯一的键名(不允许与现有键冲突)。

参数
testDescription TestDescription :描述测试的 TestDescription 对象。

testMetrics :来自测试的一组指标。

testLogs :测试期间记录的文件集。

退货
来自测试指标的一组新生成的指标。