PerfettoGeneric后处理器

public class PerfettoGenericPostProcessor
extends BasePostProcessor

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


一个后处理器,通过递归地扩展原型消息和具有字符串值的字段,直到遇到具有数值的字段,将文本/二进制度量 perfetto 原型文件处理成键值对。在构造键时将枚举和布尔值视为字符串值。

当构造键时存在重复项时,它可选择支持索引列表字段。例如

“perfetto-indexed-list-field”-perfetto.protos.AndroidStartupMetric.Startup

“perfetto-prefix-key-field”- perfetto.protos.ProcessRenderInfo.process_name

android_startup-startup#1-package_name-com.calculator-to_first_frame-dur_ns:300620342 android_startup-startup#2-package_name-com.nexuslauncher-to_first_frame-dur_ns:49257713 android_startup-startup#3-package_name-com.calculator-to_first_frame-dur_ns: 261382005

概括

公共构造函数

PerfettoGenericPostProcessor ()

公共方法

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

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

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

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

受保护的方法

MetricMeasurement.DataType getMetricType ()

将指标类型设置为 RAW 指标。

公共构造函数

PerfettoGeneric后处理器

public PerfettoGenericPostProcessor ()

公共方法

processRunMetricsAndLogs

public  processRunMetricsAndLogs ( rawMetrics, 
                 runLogs)

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

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

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

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

processTestMetricsAndLogs

public  processTestMetricsAndLogs (TestDescription testDescription, 
                 testMetrics, 
                 testLogs)

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

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

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

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

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

受保护的方法

获取指标类型

protected MetricMeasurement.DataType getMetricType ()

将指标类型设置为 RAW 指标。

退货
MetricMeasurement.DataType