public final class RichGauge extends Object
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(String name)
Creates an "empty" gauge.
|
RichGauge(String name,
double value) |
RichGauge(String name,
double value,
double alpha,
double mean,
double max,
double min,
long count) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(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() |
String |
getName() |
double |
getValue() |
int |
hashCode() |
RichGauge |
setAlpha(double alpha) |
String |
toString() |
public RichGauge(String name)
name
- the name under which the gauge will be stored.public RichGauge(String name, double value)
public RichGauge(String name, double value, double alpha, double mean, double max, double min, long count)
public String getName()
public double getValue()
public double getAverage()
public double getMax()
public double getMin()
public long getCount()
public double getAlpha()
public RichGauge setAlpha(double alpha)
Copyright © 2014. All rights reserved.