Qu

run_for_stats

Builtin index · Concurrency

run_for_stats()

Input: no input · Output: no output

What it is

Reports how the most recent run_for went against the wall clock, as a record {steps, overruns, max_lateness_ms, mean_lateness_ms, paced, pace, wall_ms, lateness_ms}. steps is the number of timer firings; lateness is how long after its wall-clock deadline a step started (0 or more, in milliseconds), given as the maximum, the mean and the full per-step Vec lateness_ms; overruns counts the steps later than the run's tolerance=; wall_ms is the wall-clock length of the whole call; pace is the factor asked for. After an unpaced run_for, paced is false, pace and the lateness figures are 0 and lateness_ms is empty. An error if no run_for has run yet.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
run_for_stats()no inputnot documented yetReports how the most recent run_for went against the wall clock, as a record {steps, overruns, max_lateness_ms, mean_lateness_ms, paced, pace, wall_ms, lateness_ms}. steps is the number of timer firings; lateness is how long after its wall-clock deadline a step started (0 or more, in milliseconds), given as the maximum, the mean and the full per-step Vec lateness_ms; overruns counts the steps later than the run's tolerance=; wall_ms is the wall-clock length of the whole call; pace is the factor asked for. After an unpaced run_for, paced is false, pace and the lateness figures are 0 and lateness_ms is empty. An error if no run_for has run yet.

Examples

No documentation example calls this form yet. The Concurrency chapter is where one belongs.

How it works

run_for_stats(): how the most recent run_for went against the wall clock. A getter rather than a different return value from run_for(..., pace=), so run_for returns the firing count whichever way it is called.

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.