PerfettoGeneric後處理器

public class PerfettoGenericPostProcessor
extends BasePostProcessor

java.lang.Object
com.android.tradefed.postprocessor.BasePostProcessor
com.android.tradefed.postprocessor.PerfettoGenericPostProcessor


一個後處理器,通過遞歸地擴展原始消息和具有字符串值的字段,直到遇到具有數值的字段,將文本/二進制度量 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 ()

公共方法

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 指標。

公共構造函數

PerfettoGeneric後處理器

public PerfettoGenericPostProcessor ()

公共方法

processRunMetricsAndLogs

public  processRunMetricsAndLogs ( rawMetrics, 
                 runLogs)

實施此方法以便從現有指標和日誌生成一組新指標。只應返回新生成的指標,並具有唯一的鍵名(不允許與現有鍵衝突)。

參數
rawMetrics :可用於運行的原始指標集。

runLogs :測試運行的日誌文件集。

退貨
從運行指標中新生成的一組指標。

processTestMetricsAndLogs

public  processTestMetricsAndLogs (TestDescription testDescription, 
                 testMetrics, 
                 testLogs)

實施此方法以發布每個測試的流程指標和日誌。只應返回新生成的指標,並具有唯一的鍵名(不允許與現有鍵衝突)。

參數
testDescription TestDescription :描述測試的 TestDescription 對象。

testMetrics :來自測試的一組指標。

testLogs :測試期間記錄的文件集。

退貨
來自測試指標的一組新生成的指標。

受保護的方法

獲取指標類型

protected MetricMeasurement.DataType getMetricType ()

將指標類型設置為 RAW 指標。

退貨
MetricMeasurement.DataType