pub struct SubscriptionStats {
pub dispatched: AtomicU64,
pub dropped: AtomicU64,
pub processed: Arc<AtomicU64>,
pub actively_processing: Arc<AtomicU64>,
pub flushed: Arc<AtomicU64>,
}
Expand description
Thread-safe statistics tracker for the various stages of subscription processing. All counters use atomic operations for thread safety.
Fields§
§dispatched: AtomicU64
Number of messages dispatched to processing queues.
dropped: AtomicU64
Number of messages dropped due to queue overflow or errors.
processed: Arc<AtomicU64>
Number of messages that have completed processing.
Wrapped in Arc
for thread sharing.
actively_processing: Arc<AtomicU64>
Number of messages currently being processed.
Wrapped in Arc
for thread sharing.
flushed: Arc<AtomicU64>
Number of messages saved to disk (not processed).
Wrapped in Arc
for thread sharing.
Implementations§
Source§impl SubscriptionStats
impl SubscriptionStats
Sourcepub fn snapshot(&self) -> SubscriptionStats
pub fn snapshot(&self) -> SubscriptionStats
This creates a new SubscriptionStats
instance with identical atomic counters.
Sourcepub fn get_dispatched(&self) -> u64
pub fn get_dispatched(&self) -> u64
Returns the current number of dispatched messages.
Sourcepub fn get_dropped(&self) -> u64
pub fn get_dropped(&self) -> u64
Returns the current number of dropped messages.
Sourcepub fn get_processed(&self) -> u64
pub fn get_processed(&self) -> u64
Returns the current number of processed messages.
Sourcepub fn get_actively_processing(&self) -> u64
pub fn get_actively_processing(&self) -> u64
Returns the current number of messages actively being processed.
Sourcepub fn get_flushed(&self) -> u64
pub fn get_flushed(&self) -> u64
Returns the current number of messages flushed to disk.
Trait Implementations§
Source§impl Default for SubscriptionStats
impl Default for SubscriptionStats
Source§fn default() -> SubscriptionStats
fn default() -> SubscriptionStats
Auto Trait Implementations§
impl !Freeze for SubscriptionStats
impl RefUnwindSafe for SubscriptionStats
impl Send for SubscriptionStats
impl Sync for SubscriptionStats
impl Unpin for SubscriptionStats
impl UnwindSafe for SubscriptionStats
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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