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,
pub failures: Vec<RecordFailure>,
}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.
Fixed records count payload bytes; RDW records count header-plus-payload physical bytes.
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.
failures: Vec<RecordFailure>The first MAX_CAPTURED_FAILURES record failures seen during the run.
records_with_errors remains the full count; this carries enough of the
detail to tell the caller which records failed and why.
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 fn note_failure(&mut self, record_index: u64, error: &Error)
pub fn note_failure(&mut self, record_index: u64, error: &Error)
Count a failed record and retain its detail, up to MAX_CAPTURED_FAILURES.
Callers previously incremented records_with_errors and dropped the
Error, which left the caller with a count and no way to find out what
went wrong. Recording both keeps the count authoritative while making the
first failures reportable.
Sourcepub fn undisclosed_failure_count(&self) -> u64
pub fn undisclosed_failure_count(&self) -> u64
Number of failures that occurred beyond the retained Self::failures.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more