public class Metric extends Object
| Constructor and Description |
|---|
Metric(String name,
String description)
Instantiates a new Metric.
|
Metric(String name,
String description,
int maxNumMeasures)
Instantiates a new Metric.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMeasure(Long measuredVal)
Adds a measure to this Metric.
|
String |
getDescription()
Returns the description of the Metric.
|
long |
getMaxMeasure()
Returns the maximum measured value for the metric
|
long |
getMeanOfMeasures()
Returns the mean value of all the measured values
|
static long |
getMeanValueOfMetrics(Collection<Metric> metrics)
Returns the mean value of a Collection of Metrics.
|
long |
getMinMeasure()
Returns the minimum measured value for the metric
|
String |
getName()
Returns the name of the Metric..
|
void |
reset()
Resets the counting of the statistics of this Metric.
|
void |
setDescription(String description)
Sets the description of the Metric.
|
void |
setName(String name)
Sets the name of the Metric.
|
public Metric(String name, String description)
name - The name of the Metric.description - The description of the Metric.public String getDescription()
public void setDescription(String description)
description - The description of the Metric.public String getName()
public void setName(String name)
name - The name of the Metric.public void addMeasure(Long measuredVal)
measuredVal - The value of the measure.public long getMinMeasure()
public long getMaxMeasure()
public long getMeanOfMeasures()
public void reset()
public static long getMeanValueOfMetrics(Collection<Metric> metrics)
metrics - The Collection of Metrics.Copyright © 2014. All Rights Reserved.