BeamConsoleWeb.Console.AdjacentRatePresenter (beam_console v0.5.0)

Copy Markdown View Source

Derives bounded rates from adjacent cumulative recorder counters.

Rates are emitted only within one recorder segment and when elapsed time and both counters are valid. Every invalid transition starts a new chart segment, so gaps, resets, missing values, and counter regressions remain visible.

Summary

Functions

Returns the rate for the latest adjacent frame pair, or nil across a discontinuity.

Builds one gap-aware, downsampled rate series from newest-first frames.

Types

counter_getter()

@type counter_getter() :: (BeamConsole.Recorder.Frame.t() -> non_neg_integer() | nil)

Functions

latest(arg1, counter_getter)

@spec latest([BeamConsole.Recorder.Frame.t()], counter_getter()) :: number() | nil

Returns the rate for the latest adjacent frame pair, or nil across a discontinuity.

series(frames, definition, counter_getter)

Builds one gap-aware, downsampled rate series from newest-first frames.