pub struct StatsCollector { /* private fields */ }Expand description
Statistics collector
Implementations§
Source§impl StatsCollector
impl StatsCollector
Sourcepub fn get_stats(&self) -> ServerStats
pub fn get_stats(&self) -> ServerStats
Get the current statistics snapshot
Sourcepub fn increment_connections(&self)
pub fn increment_connections(&self)
Increment active connections count
Sourcepub fn decrement_connections(&self)
pub fn decrement_connections(&self)
Decrement active connections count
Sourcepub fn increment_requests(&self)
pub fn increment_requests(&self)
Increment total requests count
Sourcepub fn record_cache_hit(&self)
pub fn record_cache_hit(&self)
Record a cache hit
Sourcepub fn record_cache_miss(&self)
pub fn record_cache_miss(&self)
Record a cache miss
Sourcepub fn add_bytes_sent(&self, bytes: u64)
pub fn add_bytes_sent(&self, bytes: u64)
Add to bytes sent counter
Sourcepub fn add_bytes_received(&self, bytes: u64)
pub fn add_bytes_received(&self, bytes: u64)
Add to bytes received counter
Sourcepub fn active_connections_counter(&self) -> Arc<AtomicUsize>
pub fn active_connections_counter(&self) -> Arc<AtomicUsize>
Get a clone of the active connections counter
Sourcepub fn total_requests_counter(&self) -> Arc<AtomicU64>
pub fn total_requests_counter(&self) -> Arc<AtomicU64>
Get a clone of the total requests counter
Sourcepub fn cache_hits_counter(&self) -> Arc<AtomicU64>
pub fn cache_hits_counter(&self) -> Arc<AtomicU64>
Get a clone of the cache hits counter
Sourcepub fn cache_misses_counter(&self) -> Arc<AtomicU64>
pub fn cache_misses_counter(&self) -> Arc<AtomicU64>
Get a clone of the cache misses counter
Sourcepub fn bytes_sent_counter(&self) -> Arc<AtomicU64>
pub fn bytes_sent_counter(&self) -> Arc<AtomicU64>
Get a clone of the bytes sent counter
Sourcepub fn bytes_received_counter(&self) -> Arc<AtomicU64>
pub fn bytes_received_counter(&self) -> Arc<AtomicU64>
Get a clone of the bytes received counter
Trait Implementations§
Source§impl Clone for StatsCollector
impl Clone for StatsCollector
Source§impl Debug for StatsCollector
impl Debug for StatsCollector
Auto Trait Implementations§
impl Freeze for StatsCollector
impl RefUnwindSafe for StatsCollector
impl Send for StatsCollector
impl Sync for StatsCollector
impl Unpin for StatsCollector
impl UnsafeUnpin for StatsCollector
impl UnwindSafe for StatsCollector
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