Interface FunctionCounter

All Superinterfaces:
Meter
All Known Implementing Classes:
CompositeFunctionCounter, CumulativeFunctionCounter, DropwizardFunctionCounter, NoopFunctionCounter, StepFunctionCounter

public interface FunctionCounter extends Meter
A counter that tracks a monotonically increasing function.
  • Method Details

    • builder

      static <T> FunctionCounter.Builder<T> builder(String name, @Nullable T obj, ToDoubleFunction<T> f)
    • count

      double count()
      Returns:
      The cumulative count since this counter was created.
    • measure

      default Iterable<Measurement> measure()
      Description copied from interface: Meter
      Get a set of measurements. Should always return the same number of measurements and in the same order, regardless of the level of activity or the lack thereof.
      Specified by:
      measure in interface Meter
      Returns:
      The set of measurements that represents the instantaneous value of this meter.