TraceMetricsRecorder

public class TraceMetricsRecorder
extends NumericMetricsRecorder

java.lang.Object
   ↳ com.android.tradefed.profiler.recorder.NumericMetricsRecorder
     ↳ com.android.tradefed.profiler.recorder.TraceMetricsRecorder


An IMetricsRecorder that records metrics taken from the /d/tracing directory. Metrics to be recorded need to be provided as TraceMetrics. The default descriptor has the format prefix:funcname:param[=expectedval]:metrictype.

Summary

Public constructors

TraceMetricsRecorder()

Public methods

BiFunction<Double, Double, Double> getMergeFunction(String key)
String getName()
void setUp(ITestDevice device, Collection<String> descriptors)
void startMetrics(ITestDevice device)
Map<String, Double> stopMetrics(ITestDevice device)

Protected methods

BufferedReader getReaderFromFile(File trace)

Public constructors

TraceMetricsRecorder

TraceMetricsRecorder ()

Public methods

getMergeFunction

BiFunction<Double, Double, Double> getMergeFunction (String key)

Parameters
key String
Returns
BiFunction<Double, Double, Double>

getName

String getName ()

Returns
String

setUp

void setUp (ITestDevice device, 
                Collection<String> descriptors)

Parameters
device ITestDevice
descriptors Collection
Throws
DeviceNotAvailableException

startMetrics

void startMetrics (ITestDevice device)

Parameters
device ITestDevice
Throws
DeviceNotAvailableException

stopMetrics

Map<String, Double> stopMetrics (ITestDevice device)

Parameters
device ITestDevice
Returns
Map<String, Double>
Throws
DeviceNotAvailableException

Protected methods

getReaderFromFile

BufferedReader getReaderFromFile (File trace)

Parameters
trace File
Returns
BufferedReader
Throws
FileNotFoundException