StatsdGenericPostProcessor
public class StatsdGenericPostProcessor
extends BasePostProcessor
java.lang.Object | ||
↳ | com.android.tradefed.postprocessor.BasePostProcessor | |
↳ | com.android.tradefed.postprocessor.StatsdGenericPostProcessor |
通过将报告扩展为树形结构,将二进制协议状态报告处理为键值对的后处理器。
该处理器与所遇到的度量标准报告的类型无关。通过包含检索和读取statsd报告的通用代码,它还可以作为其他statsd后处理程序的基类。
概要
公共建设者 | |
---|---|
StatsdGenericPostProcessor () |
公开方法 | |
---|---|
processRunMetricsAndLogs ( rawMetrics, runLogs) processRunMetricsAndLogs ( rawMetrics, runLogs) processRunMetricsAndLogs ( rawMetrics, runLogs) 实施此方法以便从现有指标和日志中生成一组新指标。 | |
processTestMetricsAndLogs (TestDescription testDescription, testMetrics, testLogs) processTestMetricsAndLogs (TestDescription testDescription, testMetrics, testLogs) processTestMetricsAndLogs (TestDescription testDescription, testMetrics, testLogs) 实施此方法以发布过程指标和每个测试的日志。 |
受保护的方法 | |
---|---|
convertProtoMessage (Message reportMessage) 将原始消息平整为一组成为指标的键值对。 | |
parseMetricsFromReportList (StatsLog.ConfigMetricsReportList reportList) 从解析指标 |
公共建设者
StatsdGenericPostProcessor
public StatsdGenericPostProcessor ()
公开方法
processRunMetricsAndLogs
publicprocessRunMetricsAndLogs ( rawMetrics, runLogs)
实施此方法以便从现有指标和日志中生成一组新指标。仅应返回新生成的指标,并使用唯一的键名称(不允许与现有键冲突)。
参量 | |
---|---|
rawMetrics | |
runLogs |
退货 | |
---|---|
从运行指标中新生成的指标集。 |
processTestMetricsAndLogs
publicprocessTestMetricsAndLogs (TestDescription testDescription, testMetrics, testLogs)
实施此方法以发布过程指标和每个测试的日志。仅应返回新生成的指标,并使用唯一的键名称(不允许与现有键冲突)。
参量 | |
---|---|
testDescription | TestDescription :描述测试的TestDescription对象。 |
testMetrics | |
testLogs |
退货 | |
---|---|
测试指标中新生成的指标集。 |
受保护的方法
convertProtoMessage
protectedconvertProtoMessage (Message reportMessage)
将原始消息平整为一组成为指标的键值对。
它将消息视为树,并使用从根到非消息值的级联路径作为键,而非消息值则成为度量值。通过将基于1的索引号附加到第一个元素之后的所有元素来区分重复字段中的节点。第一个元素没有附加,因为在大多数情况下,列表字段中只有一个元素,因此按原样显示更容易阅读。
TODO(b / 140432161):如果需要,可以将其分离为实用程序。
参量 | |
---|---|
reportMessage | Message |
退货 | |
---|---|
parseMetricsFromReportList
protectedparseMetricsFromReportList (StatsLog.ConfigMetricsReportList reportList)
从解析指标ConfigMetricsReportList
从statsd报告原读取。
这是此statsd后处理器的子类的主要接口。
参量 | |
---|---|
reportList | StatsLog.ConfigMetricsReportList |
退货 | |
---|---|