pub struct ChunkStats {
pub chunks_processed: usize,
pub chunks_failed: usize,
pub bytes_processed: usize,
pub processing_time_ms: u64,
pub avg_chunk_time_ms: f64,
}Expand description
Chunk processing statistics.
Fields§
§chunks_processed: usizeNumber of chunks processed
chunks_failed: usizeNumber of chunks failed
bytes_processed: usizeTotal bytes processed
processing_time_ms: u64Total processing time in milliseconds
avg_chunk_time_ms: f64Average chunk processing time in milliseconds
Implementations§
Source§impl ChunkStats
impl ChunkStats
Sourcepub fn record_chunk(&mut self, size_bytes: usize, time_ms: u64)
pub fn record_chunk(&mut self, size_bytes: usize, time_ms: u64)
Update statistics with a processed chunk.
Sourcepub fn record_failure(&mut self)
pub fn record_failure(&mut self)
Record a failed chunk.
Sourcepub fn throughput_mbps(&self) -> f64
pub fn throughput_mbps(&self) -> f64
Get the throughput in MB/s.
Trait Implementations§
Source§impl Clone for ChunkStats
impl Clone for ChunkStats
Source§fn clone(&self) -> ChunkStats
fn clone(&self) -> ChunkStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChunkStats
impl Debug for ChunkStats
Source§impl Default for ChunkStats
impl Default for ChunkStats
Source§fn default() -> ChunkStats
fn default() -> ChunkStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChunkStats
impl RefUnwindSafe for ChunkStats
impl Send for ChunkStats
impl Sync for ChunkStats
impl Unpin for ChunkStats
impl UnsafeUnpin for ChunkStats
impl UnwindSafe for ChunkStats
Blanket Implementations§
impl<T> Allocation for T
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