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 |
退貨 | |
---|---|