完美通用后处理器

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 前缀键字段” - 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 指标。

公共构造函数

完美通用后处理器

public PerfettoGenericPostProcessor ()

公共方法

进程运行指标和日志

public  processRunMetricsAndLogs ( rawMetrics, 
                 runLogs)

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

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

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

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

流程测试指标和日志

public  processTestMetricsAndLogs (TestDescription testDescription, 
                 testMetrics, 
                 testLogs)

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

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

testMetrics :测试中的一组指标。

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

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

受保护的方法

获取指标类型

protected MetricMeasurement.DataType getMetricType ()

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

退货
MetricMeasurement.DataType