Expand description
Process-wide registry of congestion-control snapshot streams.
When the auto-meta-throttle setup spawns a ControlUnit, it
register_units the unit’s snapshot watch receiver. Renderers (the
progress bar, text-update mode, future telemetry exporters) call
registered_units to enumerate the active controllers and read
their latest snapshots without subscribing to the underlying watch.
The registry is empty unless adaptive control is active; non-adaptive runs see an empty list and can render a plain progress bar.
Structs§
- Registered
Histogram - One entry in the histogram registry.
- Registered
Unit - One entry in the registry: the unit’s stable label plus a watch
receiver for its snapshot stream. The receiver is cheap to clone
(one ref-count bump), so renderers can pull the latest value
non-blockingly with
borrow().
Functions§
- clear
- Drop all registered units. Called from the process-wide reset path
in
crate::runso a second invocation ofrun()in the same process starts with a clean registry. - register_
histogram - Register a per-(side, op) histogram snapshot stream. Called once per active unit by the auto-meta setup when histograms are enabled.
- register_
unit - Register a unit’s snapshot stream with the process-wide registry.
- registered_
histograms - Cheap clone of the current histogram registry.
- registered_
units - Snapshot of the current registry. Cheap (clones the inner Vec of
Arc-backed receivers); intended to be called once per progress-render tick. - render_
lines - Render the registered units as a multi-line block suitable for
appending to the progress display. Returns an empty string when
either (a) no units are registered (non-adaptive run) or (b) every
registered unit has zero samples — typically a brief startup window
before the first probe lands, or a unit class that the current tool
never exercises (e.g.
mkdirforrcmp, which only stats both sides). With per-syscall controllers we register up to 18 units (Side × MetadataOp); per-tool only a handful actually fire probes and the rest stay hidden via thissamples_seen > 0filter.