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
- Source
Spec - What a source costs and needs.
- Source
State 🔒 - Source
Status - What
sampler.statusreports for one source.
Enums§
- Source
Id - 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.