pub struct EventStatistics {
pub total_events_published: u64,
pub total_subscriptions: u64,
pub total_unsubscriptions: u64,
pub events_by_type: HashMap<String, u64>,
pub total_processing_time: Duration,
pub average_processing_time: Duration,
}Expand description
Event statistics for monitoring
Fields§
§total_events_published: u64Total events published
total_subscriptions: u64Total subscriptions
total_unsubscriptions: u64Total unsubscriptions
events_by_type: HashMap<String, u64>Events by type
total_processing_time: DurationTotal processing time
average_processing_time: DurationAverage processing time per event
Implementations§
Source§impl EventStatistics
impl EventStatistics
pub fn new() -> Self
Sourcepub fn update_average_processing_time(&mut self)
pub fn update_average_processing_time(&mut self)
Update average processing time
Trait Implementations§
Source§impl Clone for EventStatistics
impl Clone for EventStatistics
Source§fn clone(&self) -> EventStatistics
fn clone(&self) -> EventStatistics
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 EventStatistics
impl Debug for EventStatistics
Auto Trait Implementations§
impl Freeze for EventStatistics
impl RefUnwindSafe for EventStatistics
impl Send for EventStatistics
impl Sync for EventStatistics
impl Unpin for EventStatistics
impl UnwindSafe for EventStatistics
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> 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