Expand description
Process-wide histogram logger task.
Owns one Arc<Mutex<HistogramAccumulator>> per registered (side, op)
pair (each shared with the corresponding ControlUnit). On each tick,
takes a snapshot of every accumulator, publishes the snapshot through
a per-unit watch channel for the live display, and (when a log path
was configured) appends a binary record per non-empty snapshot.
When the task ticks past a snapshot interval, it uses the actual
snapshot end time as the record’s unix_micros field — readers see
the true coverage even if the host was loaded.
Structs§
- Logger
Config - Configuration for the logger task.
- Logger
Unit - One slot the logger owns: the accumulator (shared with a ControlUnit) and the watch sender used to publish snapshots to the display.
Functions§
- run_
logger - Run the logger task: ticks, snapshots, publishes, optionally writes to file. Exits when the provided cancellation token signals.
Type Aliases§
- Progress
Source - Closure that, when called, returns the JSON-encoded current progress snapshot. The logger calls this once per tick (only when a log file is being written) and emits one Progress record. Boxed so the concrete snapshot type stays in the caller’s crate — the logger doesn’t depend on it.