Skip to main content

Module schedule

Module schedule 

Source
Expand description

Which sources to sample now, and how soon to look again.

A source is one thing worth measuring (the machine’s counters, the processes of each pane). Nothing runs unless someone holds a lease on it: a named holder asking for it at an interval, until it is released or its expiry passes. A source runs at the shortest interval among its live leases, never faster than its own minimum, and slows down while it keeps taking longer than its budget.

This is the whole decision, kept pure so it is tested with a fake clock: Scheduler::due says what to run, the caller runs it and reports Scheduler::finished, Scheduler::next_wakeup says when to look again. Times are milliseconds on one monotonic clock the caller owns. docs/reports/REPORT_SYSINFO_REWRITE_AND_MODERN_MONITOR_2026_10_13.md section 5.5.

Structs§

Lease 🔒
Scheduler
SourceSpec
What a source costs and needs.
SourceState 🔒
SourceStatus
What sampler.status reports for one source.

Enums§

SourceId
The things that can be sampled.

Constants§

CALM_RUNS 🔒
Runs well inside the budget, in a row, before a stretch is halved.
MAX_STRETCH 🔒
The most a source’s interval is stretched for running over budget.

Type Aliases§

Ms
Milliseconds on the caller’s monotonic clock.