类 RichGauge
- java.lang.Object
- org.springframework.boot.actuate.metrics.rich.RichGauge
public final class RichGauge extends Object
A gauge which stores the maximum, minimum and average in addition to the current value.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.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
equals(Object o)
double
getAlpha()
Return the smoothing constant value.double
getAverage()
Return 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()
Return the number of times the value has been set.double
getMax()
Return the maximum value of the gauge.double
getMin()
Return the minimum value of the gauge.String
getName()
Return the name of the gauge.double
getValue()
Return the current value of the gauge.int
hashCode()
RichGauge
setAlpha(double alpha)
String
toString()
方法详细资料
getValue
public double getValue()
Return the current value of the gauge.- 返回:
- the value
getAverage
public double getAverage()
Return either an exponential weighted moving average or a simple mean, respectively, depending on whether the weight 'alpha' has been set for this gauge.- 返回:
- The average over all the accumulated values
getMax
public double getMax()
Return the maximum value of the gauge.- 返回:
- the maximum value
getMin
public double getMin()
Return the minimum value of the gauge.- 返回:
- the minimum value
getCount
public long getCount()
Return the number of times the value has been set.- 返回:
- the value set count
getAlpha
public double getAlpha()
Return the smoothing constant value.- 返回:
- the alpha smoothing value