MetricsXMLResultReporter

public class MetricsXMLResultReporter
extends CollectingTestListener

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


MetricsXMLResultReporter 会在测试的 invocationEnded 阶段将测试指标和运行指标写入 metrics-folder 参数指定的文件夹中的 XML 文件。XML 文件将被管道传入算法以检测回归。

运行指标映射中的所有键值对将采用以下格式: 并放置在 标记下

运行指标映射中的所有键值对将采用以下格式: ,并放置在 标记下,该标记嵌套在 下。

XML 格式示例:

摘要

公共构造函数

MetricsXMLResultReporter()

公共方法

OutputStream createOutputStream()
String getTimeStamp()

以 String 的形式返回当前时间戳。

void invocationEnded(long elapsedTime)

公共构造函数

MetricsXMLResultReporter

public MetricsXMLResultReporter ()

公共方法

createOutputStream

public OutputStream createOutputStream ()

返回
OutputStream

getTimeStamp

public String getTimeStamp ()

以 String 的形式返回当前时间戳。

返回
String

invocationEnded

public void invocationEnded (long elapsedTime)

参数
elapsedTime long