Skip to main content

Module progress

Module progress 

Source
Expand description

Progress reporting for indexing and graph builds Progress reporting for indexing operations.

This module provides types for tracking and reporting progress during graph indexing operations. Progress events can be used to implement progress bars, logging, or other user feedback mechanisms.

§Example

use sqry_core::progress::{IndexProgress, ProgressReporter};
use std::sync::Arc;

struct ConsoleProgress;

impl ProgressReporter for ConsoleProgress {
    fn report(&self, event: IndexProgress) {
        match event {
            IndexProgress::Started { total_files } => {
                println!("Starting to index {} files...", total_files);
            }
            IndexProgress::FileCompleted { path, symbols } => {
                println!("Processed {:?}: {} items", path, symbols);
            }
            IndexProgress::Completed { total_symbols, duration } => {
                println!("Indexed {} items in {:?}", total_symbols, duration);
            }
            _ => {}
        }
    }
}

// Use ConsoleProgress when building graphs with progress reporting
let reporter: Arc<dyn ProgressReporter> = Arc::new(ConsoleProgress);

Structs§

IngestProgressTracker
Time-throttled ingestion progress tracker.
NoOpReporter
A no-op progress reporter that discards all events.
NodeIngestCounts
Node-kind counters for ingestion progress reporting.
ProgressStage
Helper for emitting coarse-grained stage progress.

Enums§

IndexProgress
Progress events emitted during indexing operations.

Traits§

ProgressReporter
Trait for reporting progress during indexing operations.

Functions§

no_op_reporter
Creates a new no-op reporter.

Type Aliases§

SharedReporter
Type alias for a shared progress reporter.