DeviceMetricData
  public
  
  
  
  class
  DeviceMetricData
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | com.android.tradefed.device.metric.DeviceMetricData | 
Object to hold all the data collected by metric collectors. TODO: Add the data holding and receiving of data methods.
Summary
| Public constructors | |
|---|---|
| 
      DeviceMetricData(IInvocationContext context)
      Ctor | |
| Public methods | |
|---|---|
| 
        
        
        
        
        
        void | 
      addMetric(String key, MetricMeasurement.Metric.Builder metric)
      Add a single metric associated with the primary device. | 
| 
        
        
        
        
        
        void | 
      addMetricForDevice(ITestDevice device, String key, MetricMeasurement.Metric.Builder metric)
      Add a single metric associated with a specified device. | 
| 
        
        
        
        
        
        void | 
      addToMetrics(Push all the data received so far to the map of metrics that will be reported. | 
Public constructors
DeviceMetricData
public DeviceMetricData (IInvocationContext context)
Ctor
| Parameters | |
|---|---|
| context | IInvocationContext | 
Public methods
addMetric
public void addMetric (String key, 
                MetricMeasurement.Metric.Builder metric)Add a single metric associated with the primary device.
| Parameters | |
|---|---|
| key | String: The key of the metric. | 
| metric | MetricMeasurement.Metric.Builder: The value associated with the metric. | 
addMetricForDevice
public void addMetricForDevice (ITestDevice device, String key, MetricMeasurement.Metric.Builder metric)
Add a single metric associated with a specified device.
| Parameters | |
|---|---|
| device | ITestDevice: theITestDevicethe metric is associated to. | 
| key | String: The key of the metric. | 
| metric | MetricMeasurement.Metric.Builder: The value associated with the metric. | 
addToMetrics
public void addToMetrics (metrics) 
Push all the data received so far to the map of metrics that will be reported. This should also clean up the resources after pushing them.
| Parameters | |
|---|---|
| metrics | : The metrics currently available. | 
