Package io.dropwizard.metrics5
Class DerivativeGauge<F,T>
java.lang.Object
io.dropwizard.metrics5.DerivativeGauge<F,T>
- Type Parameters:
F
- the base gauge's value typeT
- the derivative type
A gauge whose value is derived from the value of another gauge.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DerivativeGauge
(Gauge<F> base) Creates a new derivative with the given base gauge. -
Method Summary
-
Constructor Details
-
DerivativeGauge
Creates a new derivative with the given base gauge.- Parameters:
base
- the gauge from which to derive this gauge's value
-
-
Method Details
-
getValue
Description copied from interface:Gauge
Returns the metric's current value. -
transform
Transforms the value of the base gauge to the value of this gauge.- Parameters:
value
- the value of the base gauge- Returns:
- this gauge's value
-