StatsdBeforeAfterGaugeMetricPostProcessor
public class StatsdBeforeAfterGaugeMetricPostProcessor
extends StatsdGenericPostProcessor
java.lang.Object | |||
↳ | com.android.tradefed.postprocessor.BasePostProcessor | ||
↳ | com.android.tradefed.postprocessor.StatsdGenericPostProcessor | ||
↳ | com.android.tradefed.postprocessor.StatsdBeforeAfterGaugeMetricPostProcessor |
一种后处理器,用于处理以“之前/之后”方法收集的计量指标,即测试/运行之前的一个快照和之后的一个快照,根据提供的指标格式化程序列表提取指标并报告它们的增量。
以这种方式收集的指标如下所示:(指标驻留在原子中)
reports { metrics { gauge_metrics { data { # Bucket for the "before" snapshot bucket_info { atom {...} atom {...} ... } # Bucket for the "after" snapshot bucket_info { atom {...} atom {...} ... } } } ... } ... }
例如,如果提供的度量格式化程序是on_device_power_measurement
的键和[subsystem_name]-[rail_name]=[energy_microwatt_secs]
的值,那么subsystem_name
是display
, rail_name
是RAIL_NAME
和energy_microwatt_secs
是10
的原子的度量看起来像statsd-<config name>-gauge-on_device_power_measurement-delta-display-RAIL_NAME=10
。
之前/之后的指标通过名称匹配增量计算,因此假定格式化程序将确保每个快照在其中生成唯一的指标集。处理器将在这些情况下生成警告:
- 每个快照中的格式化程序都会生成重复的指标键
- 原子或度量键存在于一个快照中,但不存在于另一个快照中
概括
公共构造函数 | |
---|---|
StatsdBeforeAfterGaugeMetricPostProcessor () |
受保护的方法 | |
---|---|
void | logFormattedWarning (String message) 围绕 |
parseMetricsFromReportList (StatsLog.ConfigMetricsReportList reportList) 使用原子格式化程序从 |
公共构造函数
StatsdBeforeAfterGaugeMetricPostProcessor
public StatsdBeforeAfterGaugeMetricPostProcessor ()
受保护的方法
日志格式化警告
protected void logFormattedWarning (String message)
围绕CLog.w()
包装器,使测试能够观察格式化的警告。
参数 | |
---|---|
message | String |
parseMetricsFromReportList
protectedparseMetricsFromReportList (StatsLog.ConfigMetricsReportList reportList)
使用原子格式化程序从ConfigMetricsReportList
解析仪表指标。
导致重复键的事件指标将存储为逗号分隔值。
参数 | |
---|---|
reportList | StatsLog.ConfigMetricsReportList |
退货 | |
---|---|