Class RatioGauge

java.lang.Object
io.dropwizard.metrics5.RatioGauge
All Implemented Interfaces:
Gauge<Double>, Metric

public abstract class RatioGauge extends Object implements Gauge<Double>
A gauge which measures the ratio of one value to another.

If the denominator is zero, not a number, or infinite, the resulting ratio is not a number.

  • Constructor Details

    • RatioGauge

      public RatioGauge()
  • Method Details

    • getRatio

      protected abstract RatioGauge.Ratio getRatio()
      Returns the RatioGauge.Ratio which is the gauge's current value.
      Returns:
      the RatioGauge.Ratio which is the gauge's current value
    • getValue

      public Double getValue()
      Description copied from interface: Gauge
      Returns the metric's current value.
      Specified by:
      getValue in interface Gauge<Double>
      Returns:
      the metric's current value