MetricsXMLResultReporter

public class MetricsXMLResultReporter
extends CollectingTestListener

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


在測試的 invocationEnded 階段,MetricsXMLResultReporter 會將測試指標和執行指標寫入 metrics-folder 參數指定的資料夾中的 XML 檔案。XML 檔案會透過管道傳送至演算法,以偵測迴歸。

執行指標地圖中的所有鍵值組都會格式化為: ,並放在 標記下方

執行指標對映中的所有鍵值組都會格式化為 ,並放在 標記下方,這個標記會巢狀內嵌在 中。

XML 格式範例:

摘要

公用建構函式

MetricsXMLResultReporter()

公用方法

OutputStream createOutputStream()
String getTimeStamp()

String 形式傳回目前的時間戳記。

void invocationEnded(long elapsedTime)

回報是否因某種錯誤狀況而終止呼叫 (無論是否成功)。

公用建構函式

MetricsXMLResultReporter

public MetricsXMLResultReporter ()

公用方法

createOutputStream

public OutputStream createOutputStream ()

傳回
OutputStream

擲回
IOException

getTimeStamp

public String getTimeStamp ()

String 形式傳回目前的時間戳記。

傳回
String

invocationEnded

public void invocationEnded (long elapsedTime)

回報是否因某種錯誤情況而終止呼叫 (無論是否成功)。

TradeFederation 架構會自動呼叫。

參數
elapsedTime long:以毫秒為單位的呼叫經過時間