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, data)

Constructor.

Public methods

JSONObject toJson()

Returns a JSON object for the metric sample.

Public constructors

HostMetric

public HostMetric (String name, 
                long timestamp, 
                long value, 
                 data)

Constructor.

Parameters
name String: name of the metric

timestamp long: timestamp of the sample

value long: value of the sample

data : data associated with the sample

Public methods

toJson

public JSONObject toJson ()

Returns a JSON object for the metric sample.

Returns
JSONObject a JSON object.

Throws
org.json.JSONException
JSONException