public final class RichGauge extends java.lang.Object implements Metric
The value of the average will depend on whether a weight ('alpha') is set for the gauge. If it is unset, the average will contain a simple arithmetic mean. If a weight is set, an exponential moving average will be calculated as defined in this NIST document.
Constructor and Description |
---|
RichGauge(java.lang.String name)
Creates an "empty" gauge.
|
RichGauge(java.lang.String name,
double value) |
RichGauge(java.lang.String name,
double value,
double alpha,
double mean,
double max,
double min,
long count) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
double |
getAlpha() |
double |
getAverage()
Either an exponential weighted moving average or a simple mean, respectively, depending on whether the weight
'alpha' has been set for this gauge.
|
long |
getCount() |
double |
getMax() |
double |
getMin() |
java.lang.String |
getName()
Return the name of the metric.
|
double |
getValue() |
int |
hashCode() |
java.lang.String |
toString() |
public RichGauge(java.lang.String name)
name
- the name under which the gauge will be stored.public RichGauge(java.lang.String name, double value)
public RichGauge(java.lang.String name, double value, double alpha, double mean, double max, double min, long count)
public java.lang.String getName()
Metric
public double getValue()
public double getAverage()
public double getMax()
public double getMin()
public long getCount()
public double getAlpha()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object