pub struct EventStatistics {
pub total_dispatched: u64,
pub total_cancelled: u64,
pub total_consumed: u64,
pub total_dropped: u64,
pub per_event_counts: HashMap<String, u64>,
pub per_publisher_counts: HashMap<String, u64>,
pub per_listener_counts: HashMap<String, u64>,
pub peak_events_per_frame: u32,
pub avg_events_per_frame: f32,
pub avg_dispatch_time_us: f32,
pub peak_queue_depth: usize,
pub hottest_event: Option<String>,
}Fields§
§total_dispatched: u64§total_cancelled: u64§total_consumed: u64§total_dropped: u64§per_event_counts: HashMap<String, u64>§per_publisher_counts: HashMap<String, u64>§per_listener_counts: HashMap<String, u64>§peak_events_per_frame: u32§avg_events_per_frame: f32§avg_dispatch_time_us: f32§peak_queue_depth: usize§hottest_event: Option<String>Implementations§
Source§impl EventStatistics
impl EventStatistics
pub fn record_dispatch( &mut self, event: &str, publisher: &str, cancelled: bool, consumed: bool, )
pub fn top_events(&self, n: usize) -> Vec<(&String, &u64)>
pub fn cancel_rate(&self) -> f32
Trait Implementations§
Source§impl Clone for EventStatistics
impl Clone for EventStatistics
Source§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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.