Skip to main content

Module progress

Module progress 

Source
Expand description

Workspace-wide progress-bar style and the single MULTI_PROGRESS that every bar registers with.

This lives in legume_numeric::matrix — the lowest common dependency of data-beans, data_beans::alg, data_beans::aux, and the binaries — so the whole workspace shares ONE style definition and ONE MultiProgress. That single MultiProgress is what lets indicatif_log_bridge (installed by data_beans::aux::logging::init_logger) interleave log output cleanly above the bars. Duplicating the bar/MultiProgress in another crate (as graph-embedding-util once did) silently spawns a second, unbridged MultiProgress whose bars corrupt the log output — so every crate must draw through this module. data_beans::aux::logging re-exports these names for backward compatibility.

Statics§

MULTI_PROGRESS
The single global MultiProgress every workspace progress bar registers with, so log output routed through indicatif_log_bridge interleaves cleanly above the bars instead of corrupting them.

Functions§

new_progress_bar
Create a progress bar registered with the shared MULTI_PROGRESS and styled with the standard template. Attach a trailing label with ProgressBar::with_message, e.g. new_progress_bar(n).with_message("blocks"). Repaints on the shared [STEADY_TICK] cadence.
new_spinner
Create a spinner registered with the shared MULTI_PROGRESS for unbounded / streaming work (no known total). template is an indicatif spinner template (e.g. "{spinner} streamed {pos} fragments ({per_sec})"); the shared tick frames and the shared [STEADY_TICK] cadence are applied so the spinner animates and stays visually consistent across crates.