pub struct ProgressTracker {
pub name: String,
pub items_processed: Arc<RwLock<u64>>,
pub batches_processed: Arc<RwLock<u32>>,
pub start_time: SystemTime,
pub last_update: Arc<RwLock<SystemTime>>,
pub update_interval: Duration,
}
Expand description
Progress tracker for iterator operations
Fields§
§name: String
§items_processed: Arc<RwLock<u64>>
§batches_processed: Arc<RwLock<u32>>
§start_time: SystemTime
§last_update: Arc<RwLock<SystemTime>>
§update_interval: Duration
Implementations§
Source§impl ProgressTracker
impl ProgressTracker
Sourcepub fn with_update_interval(self, interval: Duration) -> Self
pub fn with_update_interval(self, interval: Duration) -> Self
Set the update interval for progress reports
Sourcepub async fn update_batch(&self, batch_size: usize)
pub async fn update_batch(&self, batch_size: usize)
Update progress with new batch
Sourcepub async fn stats(&self) -> ProgressStats
pub async fn stats(&self) -> ProgressStats
Get current statistics
Auto Trait Implementations§
impl Freeze for ProgressTracker
impl !RefUnwindSafe for ProgressTracker
impl Send for ProgressTracker
impl Sync for ProgressTracker
impl Unpin for ProgressTracker
impl !UnwindSafe for ProgressTracker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more