pub struct RunSummary {
pub records_processed: u64,
pub records_with_errors: u64,
pub warnings: u64,
pub processing_time_ms: u64,
pub bytes_processed: u64,
pub schema_fingerprint: String,
pub throughput_mbps: f64,
pub peak_memory_bytes: Option<u64>,
pub threads_used: usize,
}Expand description
Summary of a processing run with comprehensive statistics.
Captures record counts, error rates, throughput, and resource usage for a complete decode or encode operation.
Fields§
§records_processed: u64Total number of records decoded or encoded successfully.
records_with_errors: u64Number of records that encountered errors during processing.
warnings: u64Number of non-fatal warnings generated during processing.
processing_time_ms: u64Wall-clock processing time in milliseconds.
bytes_processed: u64Total bytes read from input.
schema_fingerprint: StringSHA-256 fingerprint of the schema used for processing.
throughput_mbps: f64Processing throughput in MiB/s.
peak_memory_bytes: Option<u64>Peak memory usage in bytes, if available from the runtime.
threads_used: usizeNumber of worker threads used for parallel processing.
Implementations§
Source§impl RunSummary
impl RunSummary
Sourcepub fn with_threads(threads: usize) -> Self
pub fn with_threads(threads: usize) -> Self
Create a new run summary with specified thread count
Sourcepub fn calculate_throughput(&mut self)
pub fn calculate_throughput(&mut self)
Calculate throughput based on bytes and time
Sourcepub const fn has_errors(&self) -> bool
pub const fn has_errors(&self) -> bool
Check if processing had any errors
Sourcepub const fn has_warnings(&self) -> bool
pub const fn has_warnings(&self) -> bool
Check if processing had any warnings
Sourcepub const fn is_successful(&self) -> bool
pub const fn is_successful(&self) -> bool
Check if processing was successful (no errors)
Sourcepub const fn total_records(&self) -> u64
pub const fn total_records(&self) -> u64
Get the total number of records attempted (processed + errors)
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Get the success rate as a percentage (0.0 to 100.0)
Sourcepub fn error_rate(&self) -> f64
pub fn error_rate(&self) -> f64
Get the error rate as a percentage (0.0 to 100.0)
Sourcepub fn processing_time_seconds(&self) -> f64
pub fn processing_time_seconds(&self) -> f64
Get processing time in seconds
Sourcepub fn bytes_processed_mb(&self) -> f64
pub fn bytes_processed_mb(&self) -> f64
Get bytes processed in megabytes
Sourcepub fn set_schema_fingerprint(&mut self, fingerprint: String)
pub fn set_schema_fingerprint(&mut self, fingerprint: String)
Set the schema fingerprint
Sourcepub fn set_peak_memory_bytes(&mut self, bytes: u64)
pub fn set_peak_memory_bytes(&mut self, bytes: u64)
Set the peak memory usage
Trait Implementations§
Source§impl Clone for RunSummary
impl Clone for RunSummary
Source§fn clone(&self) -> RunSummary
fn clone(&self) -> RunSummary
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more