MetricsXMLResultReporter

public class MetricsXMLResultReporter
extends CollectingTestListener

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


MetricsXMLResultReporter writes test metrics and run metrics to an XML file in a folder specified by metrics-folder parameter at the invocationEnded phase of the test. The XML file will be piped into an algorithm to detect regression.

All k-v paris in run metrics map will be formatted into: and placed under tag

All k-v paris in run metrics map will be formatted into: and placed under tag, a tag nested under .

A sample XML format:

Summary

Public constructors

MetricsXMLResultReporter()

Public methods

OutputStream createOutputStream()
String getTimeStamp()

Return the current timestamp as a String.

void invocationEnded(long elapsedTime)

Reports that the invocation has terminated, whether successfully or due to some error condition.

Public constructors

MetricsXMLResultReporter

public MetricsXMLResultReporter ()

Public methods

createOutputStream

public OutputStream createOutputStream ()

Returns
OutputStream

getTimeStamp

public String getTimeStamp ()

Return the current timestamp as a String.

Returns
String

invocationEnded

public void invocationEnded (long elapsedTime)

Reports that the invocation has terminated, whether successfully or due to some error condition.

Will be automatically called by the TradeFederation framework.

Parameters
elapsedTime long: the elapsed time of the invocation in ms