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§
- Ingest
Progress Tracker - Time-throttled ingestion progress tracker.
- NoOp
Reporter - A no-op progress reporter that discards all events.
- Node
Ingest Counts - Node-kind counters for ingestion progress reporting.
- Progress
Stage - Helper for emitting coarse-grained stage progress.
Enums§
- Index
Progress - Progress events emitted during indexing operations.
Traits§
- Progress
Reporter - Trait for reporting progress during indexing operations.
Functions§
- no_
op_ reporter - Creates a new no-op reporter.
Type Aliases§
- Shared
Reporter - Type alias for a shared progress reporter.