TraceMetric

public class TraceMetric
extends Object

java.lang.Object
   ↳ com.android.tradefed.profiler.recorder.TraceMetric


A class representing a metric which TraceMetricsRecorder can receive. Instances of TraceMetric should usually be acquired via the parse(String) method, which constructs them from a string with the following format: prefix:funcname:param[=expval]:mtype These variables represent the following: * prefix: The directory under /d/tracing/events containing the metric name. * funcname: The name of the metric, located under /d/tracing/events/[prefix]. * param: Which column of output from /d/tracing/trace to record. * expval (optional): An expected value for this metric. Metrics will only be recorded if they match this value. * mtype: The MetricType which describes how this metric should be aggregated.

Summary

Public constructors

TraceMetric(String prefix, String funcName, String param, MetricType metricType)

Constructor with no expected value parameter.

TraceMetric(String prefix, String funcName, String param, Double expectedVal, MetricType metricType)

Constructor with expected value parameter.

Public methods

boolean equals(Object obj)
Double getExpectedVal()
String getFuncName()
MetricType getMetricType()
String getParam()
String getPrefix()
int hashCode()
static TraceMetric parse(String text)

Expected format: prefix:funcname:param[=expval]:mtype

String toString()

Public constructors

TraceMetric

TraceMetric (String prefix, 
                String funcName, 
                String param, 
                MetricType metricType)

Constructor with no expected value parameter.

Parameters
prefix String: the directory under /d/tracing/events containing the metric

funcName String: the name of the metric from /d/tracing/events/[prefix]

param String: the column from /d/tracing/trace containing data to record

metricType MetricType: the MetricType describing how to aggregate this metric

TraceMetric

TraceMetric (String prefix, 
                String funcName, 
                String param, 
                Double expectedVal, 
                MetricType metricType)

Constructor with expected value parameter.

Parameters
prefix String: the directory under /d/tracing/events containing the metric

funcName String: the name of the metric from /d/tracing/events/[prefix]

param String: the column from /d/tracing/trace containing data to record

expectedVal Double: the expected value of [param]

metricType MetricType: the MetricType describing how to aggregate this metric

Public methods

equals

boolean equals (Object obj)

Parameters
obj Object

Returns
boolean

getExpectedVal

Double getExpectedVal ()

Returns
Double

getFuncName

String getFuncName ()

Returns
String

getMetricType

MetricType getMetricType ()

Returns
MetricType

getParam

String getParam ()

Returns
String

getPrefix

String getPrefix ()

Returns
String

hashCode

int hashCode ()

Returns
int

parse

TraceMetric parse (String text)

Expected format: prefix:funcname:param[=expval]:mtype

Parameters
text String

Returns
TraceMetric

toString

String toString ()

Returns
String