MetricsXmlParser

public class MetricsXmlParser
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.MetricsXmlParser


Parser that extracts test metrics result data generated by MetricsXMLResultReporter.

Summary

Nested classes

class MetricsXmlParser.ParseException

Thrown when MetricsXmlParser fails to parse a metrics xml file. 

Public constructors

MetricsXmlParser()

Public methods

static Metrics parse(Metrics metrics, Set<String> blacklistMetrics, InputStream is)
static Metrics parse(Set<String> blacklistMetrics, boolean strictMode, List<File> metricXmlFiles)

Parses xml data contained in given input files.

Public constructors

MetricsXmlParser

public MetricsXmlParser ()

Public methods

parse

public static Metrics parse (Metrics metrics, 
                Set<String> blacklistMetrics, 
                InputStream is)

Parameters
metrics Metrics

blacklistMetrics Set

is InputStream

Returns
Metrics

Throws
MetricsXmlParser.ParseException

parse

public static Metrics parse (Set<String> blacklistMetrics, 
                boolean strictMode, 
                List<File> metricXmlFiles)

Parses xml data contained in given input files.

Parameters
blacklistMetrics Set: ignore the metrics with these names

strictMode boolean: whether to throw an exception when metric validation fails

metricXmlFiles List: a list of metric xml files

Returns
Metrics a Metric object containing metrics from all metric files

Throws
MetricsXmlParser.ParseException if input could not be parsed