pub struct WatchFolderStats {
pub processed_count: u64,
pub error_count: u64,
pub total_processing_time_ms: u64,
pub total_bytes_processed: u64,
pub min_processing_time_ms: Option<u64>,
pub max_processing_time_ms: Option<u64>,
}Expand description
Statistics for a watch folder’s processing activity.
Fields§
§processed_count: u64Total number of files processed successfully.
error_count: u64Total number of files that failed processing.
total_processing_time_ms: u64Total processing time in milliseconds across all successful jobs.
total_bytes_processed: u64Total bytes processed (input file sizes).
min_processing_time_ms: Option<u64>Minimum processing time in milliseconds.
max_processing_time_ms: Option<u64>Maximum processing time in milliseconds.
Implementations§
Source§impl WatchFolderStats
impl WatchFolderStats
Sourcepub fn record_success(&mut self, processing_time_ms: u64, file_size_bytes: u64)
pub fn record_success(&mut self, processing_time_ms: u64, file_size_bytes: u64)
Records a successful processing event.
Sourcepub fn record_error(&mut self)
pub fn record_error(&mut self)
Records a failed processing event.
Sourcepub fn avg_processing_time_ms(&self) -> Option<u64>
pub fn avg_processing_time_ms(&self) -> Option<u64>
Returns the average processing time in milliseconds, or None if no files processed.
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Returns the success rate as a fraction [0.0, 1.0].
Sourcepub fn avg_throughput_bps(&self) -> Option<f64>
pub fn avg_throughput_bps(&self) -> Option<f64>
Returns the average throughput in bytes per second, or None if no data.
Trait Implementations§
Source§impl Clone for WatchFolderStats
impl Clone for WatchFolderStats
Source§fn clone(&self) -> WatchFolderStats
fn clone(&self) -> WatchFolderStats
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 WatchFolderStats
impl Debug for WatchFolderStats
Source§impl Default for WatchFolderStats
impl Default for WatchFolderStats
Source§fn default() -> WatchFolderStats
fn default() -> WatchFolderStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WatchFolderStats
impl RefUnwindSafe for WatchFolderStats
impl Send for WatchFolderStats
impl Sync for WatchFolderStats
impl Unpin for WatchFolderStats
impl UnsafeUnpin for WatchFolderStats
impl UnwindSafe for WatchFolderStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more