kumulant

HasRate

interface HasRate : Result(source)

Result trait for accumulators that produce a normalised throughput. Implemented by com.eignex.kumulant.stat.rate.RateResult (and friends), so downstream code written against HasRate works for any rate-shaped stat regardless of the underlying mechanism; uniform-over-window (com.eignex.kumulant.stat.rate.RateStat), counter-differentiated (com.eignex.kumulant.stat.rate.CounterRateStat), or exponentially-decayed (com.eignex.kumulant.stat.rate.DecayingRateStat).

Inheritors

Properties

Link copied to clipboard
abstract val rate: Double

Normalised rate in events per second (Hz). Zero when no observations have arrived.

Functions

Link copied to clipboard
open fun per(duration: Duration): Double

Rescale the throughput to a specific time duration. Equivalent to rate * duration.toDouble(DurationUnit.SECONDS).

per

open fun per(duration: Duration): Double(source)

Rescale the throughput to a specific time duration. Equivalent to rate * duration.toDouble(DurationUnit.SECONDS).

Example: rate.per(1.minutes) returns events per minute.

rate

abstract val rate: Double(source)

Normalised rate in events per second (Hz). Zero when no observations have arrived.