PerfettoGenericPostProcessor
public
class
PerfettoGenericPostProcessor
extends BasePostProcessor
| java.lang.Object | ||
| ↳ | com.android.tradefed.postprocessor.BasePostProcessor | |
| ↳ | com.android.tradefed.postprocessor.PerfettoGenericPostProcessor | |
一种后处理器,用于通过 递归展开具有字符串值的 proto 消息和字段,直到遇到具有 数值的字段,将文本/二进制指标 perfetto proto 文件处理为键值对。在构造 键时,将枚举和布尔值视为字符串值。
在构造 键时,如果存在重复项,它会选择性地支持为列表字段编制索引。例如
"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()
|
|
公共方法 | |
|---|---|
Map<String, MetricMeasurement.Metric.Builder>
|
processRunMetricsAndLogs(HashMap<String, MetricMeasurement.Metric> rawMetrics, Map<String, LogFile> runLogs)
实现此方法,以便根据现有指标和 日志。 |
Map<String, MetricMeasurement.Metric.Builder>
|
processTestMetricsAndLogs(TestDescription testDescription, HashMap<String, MetricMeasurement.Metric> testMetrics, Map<String, LogFile> testLogs)
实现此方法,以便对每次测试的指标和日志进行后处理。 |
受保护的方法 | |
|---|---|
MetricMeasurement.DataType
|
getMetricType()
将指标类型设置为原始指标。 |
公共构造函数
PerfettoGenericPostProcessor
public PerfettoGenericPostProcessor ()
公共方法
processRunMetricsAndLogs
public Map<String, MetricMeasurement.Metric.Builder> processRunMetricsAndLogs (HashMap<String, MetricMeasurement.Metric> rawMetrics,
Map<String, LogFile> runLogs)实现此方法,以便根据现有指标和 日志生成一组新指标。应仅返回新生成的指标,并且使用唯一的键名称(不允许与现有键 冲突)。
| 参数 | |
|---|---|
rawMetrics |
HashMap:可用于运行的一组原始指标。 |
runLogs |
Map:测试运行的一组日志文件。 |
| 返回 | |
|---|---|
Map<String, MetricMeasurement.Metric.Builder> |
根据运行指标生成的一组新指标。 |
processTestMetricsAndLogs
public Map<String, MetricMeasurement.Metric.Builder> processTestMetricsAndLogs (TestDescription testDescription, HashMap<String, MetricMeasurement.Metric> testMetrics, Map<String, LogFile> testLogs)
实现此方法,以便对每次测试的指标和日志进行后处理。应仅返回新生成的 指标,并且使用唯一的键名称(不允许与现有 键冲突)。
| 参数 | |
|---|---|
testDescription |
TestDescription:描述测试的 TestDescription 对象。 |
testMetrics |
HashMap:测试中的一组指标。 |
testLogs |
Map:测试期间记录的一组文件。 |
| 返回 | |
|---|---|
Map<String, MetricMeasurement.Metric.Builder> |
根据测试指标生成的一组新指标。 |
受保护的方法
getMetricType
protected MetricMeasurement.DataType getMetricType ()
将指标类型设置为原始指标。
| 返回 | |
|---|---|
MetricMeasurement.DataType |
|