HostMetric

public class HostMetric
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.hostmetric.HostMetric


This class represents a host metric sample to be reported.

Summary

Public constructors

HostMetric(String name, long timestamp, long value, Map<String, String> data)

Constructor.

Public methods

JSONObject toJson()

Returns a JSON object for the metric sample.

Public constructors

HostMetric

HostMetric (String name, 
                long timestamp, 
                long value, 
                Map<String, String> data)

Constructor.

Parameters
name String: name of the metric
timestamp long: timestamp of the sample
value long: value of the sample
data Map: data associated with the sample

Public methods

toJson

JSONObject toJson ()

Returns a JSON object for the metric sample.

Returns
JSONObject a JSON object.
Throws
JSONException