pub struct AtomicCounters {
pub total_requests: AtomicUsize,
pub active_sessions: AtomicUsize,
pub processed_messages: AtomicUsize,
pub cache_hits: AtomicUsize,
pub cache_misses: AtomicUsize,
}Expand description
Atomic counters for system metrics
Fields§
§total_requests: AtomicUsize§active_sessions: AtomicUsize§processed_messages: AtomicUsize§cache_hits: AtomicUsize§cache_misses: AtomicUsizeImplementations§
Source§impl AtomicCounters
impl AtomicCounters
pub fn new() -> Self
pub fn inc_total_requests(&self) -> usize
pub fn inc_processed_messages(&self) -> usize
pub fn inc_cache_hit(&self) -> usize
pub fn inc_cache_miss(&self) -> usize
Auto Trait Implementations§
impl !Freeze for AtomicCounters
impl RefUnwindSafe for AtomicCounters
impl Send for AtomicCounters
impl Sync for AtomicCounters
impl Unpin for AtomicCounters
impl UnsafeUnpin for AtomicCounters
impl UnwindSafe for AtomicCounters
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> 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