pub struct BatchStats {
pub total_messages: usize,
pub total_batches: usize,
pub successful: usize,
pub failed: usize,
}Expand description
Statistics for batch processing
Fields§
§total_messages: usizeTotal number of messages processed
total_batches: usizeNumber of batches processed
successful: usizeNumber of successful messages
failed: usizeNumber of failed messages
Implementations§
Source§impl BatchStats
impl BatchStats
Sourcepub fn record_batch(
&mut self,
batch_size: usize,
successes: usize,
failures: usize,
)
pub fn record_batch( &mut self, batch_size: usize, successes: usize, failures: usize, )
Record a batch result
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Get the success rate as a percentage
Sourcepub fn average_batch_size(&self) -> f64
pub fn average_batch_size(&self) -> f64
Get the average batch size
Trait Implementations§
Source§impl Clone for BatchStats
impl Clone for BatchStats
Source§fn clone(&self) -> BatchStats
fn clone(&self) -> BatchStats
Returns a duplicate of the value. Read more
1.0.0 · 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 BatchStats
impl Debug for BatchStats
Source§impl Default for BatchStats
impl Default for BatchStats
Source§fn default() -> BatchStats
fn default() -> BatchStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BatchStats
impl RefUnwindSafe for BatchStats
impl Send for BatchStats
impl Sync for BatchStats
impl Unpin for BatchStats
impl UnwindSafe for BatchStats
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