Struct alice_protocol_reader::stats::Stats
source · pub struct Stats { /* private fields */ }Expand description
Struct for tracking and reporting statistics about the input data.
Implementations§
source§impl Stats
impl Stats
sourcepub fn new(reporter: Sender<InputStatType>) -> Self
pub fn new(reporter: Sender<InputStatType>) -> Self
Create a new Stats instance.
sourcepub fn try_add_link(&mut self, link: u8)
pub fn try_add_link(&mut self, link: u8)
Attempt to add a link id to the observed links (is only added if not already present in the list).
sourcepub fn try_add_fee_id(&mut self, fee_id: u16)
pub fn try_add_fee_id(&mut self, fee_id: u16)
Attempt to add a FEE ID to the observed FEE IDs (is only added if not already present in the list).
sourcepub fn rdh_filtered(&mut self)
pub fn rdh_filtered(&mut self)
Increment the RDH filtered counter.
sourcepub fn add_payload_size(&mut self, payload_size: u16)
pub fn add_payload_size(&mut self, payload_size: u16)
Add a payload size to the total payload size seen.
sourcepub fn flush_stats(&mut self)
pub fn flush_stats(&mut self)
Flush the stats to the reporter channel (sends all the current stats).
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnwindSafe for Stats
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