Class RateMeasurement

java.lang.Object
io.camunda.zeebe.logstreams.impl.flowcontrol.RateMeasurement

@ThreadSafe public final class RateMeasurement extends Object
Measures the rate of change for monotonically increasing values.
  • Constructor Details

  • Method Details

    • observe

      public boolean observe(long value)
      Updates the rate measurement with the given value.

      The new observation will be ignored if it is not the first or measured after the previous at least by the resolution time.

      Parameters:
      value - to update the rate measurement with.
      Returns:
      true if the observation was added, false if the observation was skipped.
    • rate

      public long rate()