Module progress

Module progress 

Source
Expand description

Progress feedback infrastructure for debtmap analysis.

This module provides centralized progress management using the indicatif library. Progress bars are shown for all major analysis phases including call graph building, trait resolution, coverage loading, and unified analysis.

§Progress Behavior

  • Quiet Mode: No progress output (respects DEBTMAP_QUIET env var and --quiet flag)
  • Non-TTY: Gracefully disables progress bars in CI and piped output
  • Verbosity Levels:
    • Level 0 (default): Main progress bars only
    • Level 1 (-v): Sub-phase progress and timing
    • Level 2 (-vv): Detailed per-phase metrics

§Examples

use debtmap::progress::{ProgressConfig, ProgressManager, TEMPLATE_CALL_GRAPH};

let config = ProgressConfig::from_env(false, 0);
let manager = ProgressManager::new(config);

let progress = manager.create_bar(100, TEMPLATE_CALL_GRAPH);
progress.set_message("Building call graph");

// Process files...
for _i in 0..100 {
    // Work...
    progress.inc(1);
}

progress.finish_with_message("Call graph complete");

Structs§

ProgressConfig
Configuration for progress display behavior
ProgressManager
Centralized progress manager for coordinating multiple progress bars

Constants§

TEMPLATE_CALL_GRAPH
TEMPLATE_COVERAGE
TEMPLATE_FILE_ANALYSIS
TEMPLATE_FUNCTION_ANALYSIS
TEMPLATE_SPINNER
TEMPLATE_TRAIT_RESOLUTION