Skip to main content

Module observability

Module observability 

Source
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§

RegisteredHistogram
One entry in the histogram registry.
RegisteredUnit
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::run so a second invocation of run() 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. mkdir for rcmp, 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 this samples_seen > 0 filter.