pub struct ShardCounters {
pub events_ingested: AtomicU64,
pub events_dropped: AtomicU64,
pub batches_dispatched: AtomicU64,
}Expand description
Atomic counters for a single shard. Kept outside Shard as Arcs
so ShardManager::stats() can aggregate them without locking each
shard’s mutex.
Fields§
§events_ingested: AtomicU64Total events ingested into this shard.
events_dropped: AtomicU64Events dropped due to backpressure.
batches_dispatched: AtomicU64Batches successfully dispatched to the adapter.
Implementations§
Source§impl ShardCounters
impl ShardCounters
Sourcepub fn snapshot(&self) -> ShardStats
pub fn snapshot(&self) -> ShardStats
Load a consistent snapshot of the counters.
events_unrouted is left at zero here — it is a manager-level
counter, not a per-shard one. ShardManager::stats() fills it
in after summing per-shard fields.
Trait Implementations§
Source§impl Debug for ShardCounters
impl Debug for ShardCounters
Source§impl Default for ShardCounters
impl Default for ShardCounters
Source§fn default() -> ShardCounters
fn default() -> ShardCounters
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ShardCounters
impl RefUnwindSafe for ShardCounters
impl Send for ShardCounters
impl Sync for ShardCounters
impl Unpin for ShardCounters
impl UnsafeUnpin for ShardCounters
impl UnwindSafe for ShardCounters
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