度量文件后处理器

public class MetricFilePostProcessor
extends BasePostProcessor

java.lang.Object
com.android.tradefed.postprocessor.BasePostProcessor
com.android.tradefed.postprocessor.MetricFilePostProcessor


用于上传测试和运行级别期间收集的指标日志文件。使用“aggregate-similar-tests”选项在测试运行级别聚合相似的测试指标并将其写入日志文件。仅迭代次数不同或具有相同名称的测试被视为相似测试。这将只能访问原始指标。

概括

公共构造函数

MetricFilePostProcessor ()
MetricFilePostProcessor ( MetricUtility metricUtil)

公共方法

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

实现此方法是为了从现有指标和日志生成一组新指标。

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

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

void setUp ()

在子后处理器中重写此方法以在测试运行之前进行初始化。

void writeMetricFile ( metrics, String testId) writeMetricFile ( metrics, String testId)

将指标写入结果文件并上传。

公共构造函数

度量文件后处理器

public MetricFilePostProcessor ()

度量文件后处理器

public MetricFilePostProcessor (MetricUtility metricUtil)

参数
metricUtil MetricUtility

公共方法

进程运行指标和日志

public  processRunMetricsAndLogs ( rawMetrics, 
                 runLogs)

实现此方法是为了从现有指标和日志生成一组新指标。仅应返回新生成的指标,并具有唯一的键名称(不允许与现有键发生冲突)。

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

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

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

流程测试指标和日志

public  processTestMetricsAndLogs (TestDescription testDescription, 
                 testMetrics, 
                 testLogs)

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

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

testMetrics :测试中的一组指标。

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

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

设置

public void setUp ()

在子后处理器中重写此方法以在测试运行之前进行初始化。

写度量文件

public void writeMetricFile ( metrics, 
                String testId)

将指标写入结果文件并上传。