Google is committed to advancing racial equity for Black communities. See how.

MetricUtil

public class MetricUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.statsd.MetricUtil


Utility class for pulling metrics from pushed statsd configurations.

Summary

Public constructors

MetricUtil()

Public methods

static getEventMetricData(ITestDevice device, long configId)

Get statsd event metrics data from the device using the statsd config id.

static InputStreamSource getReportByteStream(ITestDevice device, long configId)

Get Statsd report as a byte stream source

static StatsLog.StatsdStatsReport getStatsdMetadata(ITestDevice device)

Get statsd metadata which also contains system server crash information.

Public constructors

MetricUtil

public MetricUtil ()

Public methods

getEventMetricData

public static  getEventMetricData (ITestDevice device, 
                long configId)

Get statsd event metrics data from the device using the statsd config id.

Parameters
device ITestDevice

configId long

Returns

Throws
DeviceNotAvailableException

getReportByteStream

public static InputStreamSource getReportByteStream (ITestDevice device, 
                long configId)

Get Statsd report as a byte stream source

Parameters
device ITestDevice

configId long

Returns
InputStreamSource

Throws
DeviceNotAvailableException

getStatsdMetadata

public static StatsLog.StatsdStatsReport getStatsdMetadata (ITestDevice device)

Get statsd metadata which also contains system server crash information.

Parameters
device ITestDevice

Returns
StatsLog.StatsdStatsReport

Throws
DeviceNotAvailableException
InvalidProtocolBufferException