Skip to main content

track_scope_with_progress

Function track_scope_with_progress 

Source
pub fn track_scope_with_progress(
    label: impl Into<String>,
    total: u64,
) -> (ProcessScopeGuard, ScopeProgress)
Expand description

Open a tracked scope that also exposes a live progress counter to the heartbeat. The returned ScopeProgress is cheap to clone into worker closures; bump it as the loop advances and the heartbeat will surface progress=a/b (X%) on the active-scope line. The scope closes when the returned guard is dropped, exactly like track_scope.