kumulant

DecayingSumResult

@Serializable
@SerialName(value = "DecayingSumResult")
data class DecayingSumResult(val sum: Double, val timestampNanos: Long, val halfLifeNanos: Long) : HasRate(source)

Snapshot of an exponentially time-decayed sum at timestampNanos.

rate reads the sum as a decayed throughput, sum * ln(2) / halfLife per second: for unit values that is events per second, weighted toward the last few half-lives.

Constructors

DecayingSumResult

constructor(sum: Double, timestampNanos: Long, halfLifeNanos: Long)(source)

Properties

halfLifeNanos

Half-life of past contributions, in nanoseconds.

rate

open override val rate: Double(source)

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

sum

Time-decayed sum at timestampNanos.

timestampNanos

Wall-clock timestamp (nanoseconds) at which the snapshot was taken.

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).