指標 XMLResultReporter

public class MetricsXMLResultReporter
extends CollectingTestListener

java.lang.Object
com.android.tradefed.result.CollectingTestListener
com.android.tradefed.result.MetricsXMLResultReporter


MetricsXMLResultReporter 在測試的 invocationEnded 階段將測試指標和運行指標寫入 metrics-folder 參數指定的文件夾中的 XML 文件。 XML 文件將通過管道傳輸到算法中以檢測回歸。

run metrics map 中的所有 kv paris 將被格式化為:並放在標籤

run metrics map 中的所有 kv paris 將被格式化為:並放在標籤,嵌套在下面的標籤.

示例 XML 格式:

概括

公共構造函數

MetricsXMLResultReporter ()

公共方法

OutputStream createOutputStream ()
String getTimeStamp ()

將當前時間戳作為ERROR(/String)返回。

void invocationEnded (long elapsedTime)

報告調用已終止,無論是成功終止還是由於某些錯誤情況。

公共構造函數

指標 XMLResultReporter

public MetricsXMLResultReporter ()

公共方法

創建輸出流

public OutputStream createOutputStream ()

退貨
OutputStream

獲取時間戳

public String getTimeStamp ()

將當前時間戳作為ERROR(/String)返回。

退貨
String

調用結束

public void invocationEnded (long elapsedTime)

報告調用已終止,無論是成功終止還是由於某些錯誤情況。

將由 TradeFederation 框架自動調用。

參數
elapsedTime long :調用經過的時間(以毫秒為單位)