kumulant

ExcursionResult

@Serializable
@SerialName(value = "ExcursionResult")
data class ExcursionResult(val peak: Double, val peakTimestampNanos: Long, val trough: Double, val troughTimestampNanos: Long, val maxExcursion: Double, val currentRecovery: Double, val hasObservation: Boolean = true) : Result(source)

Running peak / trough excursion summary.

Constructors

ExcursionResult

constructor(peak: Double, peakTimestampNanos: Long, trough: Double, troughTimestampNanos: Long, maxExcursion: Double, currentRecovery: Double, hasObservation: Boolean = true)(source)

Properties

currentRecovery

peak - lastValue; how far the latest observation sits below the all-time peak.

hasObservation

False until the first update has been recorded, mirroring com.eignex.kumulant.stat.event.RecencyResult.hasObservation.

Without it an untouched stat is indistinguishable from one that observed 0.0 at timestamp 0, because ExcursionStat.read reports all zeros for both - and ExcursionStat.merge then folded those in as real data, dragging the peak of an all-negative stream up to a value never observed. Defaults to true so a payload encoded before the field existed still decodes as real data.

maxExcursion

Largest peak_at_time - subsequent_trough observed across the stream.

peak

Highest value observed so far.

peakTimestampNanos

Timestamp (nanoseconds) at which peak was set.

trough

Lowest value observed strictly after the peak was last set.

troughTimestampNanos

Timestamp of trough; equal to peakTimestampNanos if no post-peak observation exists.