Interface Meter

  • All Superinterfaces:
    AutoCloseable, UncheckedCloseable

    public interface Meter
    extends UncheckedCloseable
    Meter metric, which measures throughput.

    Note that this with mark() measures the rate at which a set of events occur; whereas Counter is for things which will increase() - and can also decrease().

    • Method Detail

      • mark

        default void mark()
        Mark the occurrence of an event.
      • mark

        void mark​(long howMany)
        Mark the occurrence of a given number of events.
      • get

        long get()
        Gets the total number of events. Beware that this could have overflown. This is typically used in unit tests of metrics, more than to expose the metrics in production (because exposing metrics is really the role of the infrautils metrics implementation of this API).