pub struct ProgressCounters {
pub files_done: Arc<AtomicUsize>,
pub files_total: Arc<AtomicUsize>,
pub phase: Option<Arc<Mutex<String>>>,
pub attrib_done: Arc<AtomicUsize>,
pub attrib_total: Arc<AtomicUsize>,
}Expand description
Atomics shared between analyze() and the caller so the caller can poll scan progress.
Fields§
§files_done: Arc<AtomicUsize>Number of candidate files processed so far (incremented per file, across all threads).
files_total: Arc<AtomicUsize>Total candidate files discovered (set before parallel analysis begins).
phase: Option<Arc<Mutex<String>>>Current high-level phase label, shared with the web poll endpoint so the UI can show which
stage the scan is in. Set by analyze() when it enters the long per-file git blame
attribution pass — otherwise the caller looks frozen after file counting finishes. Optional
so non-web callers can leave it out.
attrib_done: Arc<AtomicUsize>Files blamed so far during the authorship-attribution pass. Tracked separately from
files_done (the discovery/analysis pass) because the two passes overlap the same files but
run at very different speeds.
attrib_total: Arc<AtomicUsize>Total files to blame during attribution — 0 until the pass starts, and it stays 0 when attribution is disabled or the scanned path is not a git repository.