pub struct LockFreeStatsCollector { /* private fields */ }Expand description
Lock-free statistics collector using atomic operations
Implementations§
Source§impl LockFreeStatsCollector
impl LockFreeStatsCollector
Sourcepub fn record_event(&self)
pub fn record_event(&self)
Record a processed event (lock-free, relaxed ordering for maximum performance)
Sourcepub fn record_trades(&self, count: u64)
pub fn record_trades(&self, count: u64)
Record processed trades in batch (lock-free)
Sourcepub fn record_orderbooks(&self, count: u64)
pub fn record_orderbooks(&self, count: u64)
Record processed orderbooks in batch (lock-free)
Sourcepub fn record_bytes_serialized(&self, bytes: u64)
pub fn record_bytes_serialized(&self, bytes: u64)
Record serialized bytes (lock-free)
Sourcepub fn record_simd_batch(&self)
pub fn record_simd_batch(&self)
Record SIMD batch processing (lock-free)
Sourcepub fn record_buffer_reuse(&self)
pub fn record_buffer_reuse(&self)
Record buffer reuse (lock-free)
Sourcepub fn record_zero_copy_ops(&self, count: u64)
pub fn record_zero_copy_ops(&self, count: u64)
Record zero-copy operations (lock-free)
Sourcepub fn update_latency(&self, latency_nanos: u64)
pub fn update_latency(&self, latency_nanos: u64)
Update average latency using exponential moving average (lock-free)
Sourcepub fn record_connection_error(&self)
pub fn record_connection_error(&self)
Record connection error (lock-free)
Sourcepub fn record_parsing_error(&self)
pub fn record_parsing_error(&self)
Record parsing error (lock-free)
Sourcepub fn record_serialization_error(&self)
pub fn record_serialization_error(&self)
Record serialization error (lock-free)
Sourcepub fn record_exchange_message(&self, exchange: &str, bytes: u64)
pub fn record_exchange_message(&self, exchange: &str, bytes: u64)
Record exchange message (mostly lock-free, minimal lock contention)
Sourcepub fn record_exchange_reconnection(&self, exchange: &str)
pub fn record_exchange_reconnection(&self, exchange: &str)
Record exchange reconnection (mostly lock-free)
Sourcepub fn get_snapshot(&self) -> StatsSnapshot
pub fn get_snapshot(&self) -> StatsSnapshot
Get a snapshot of current statistics (mostly lock-free reads)
Sourcepub fn get_events_per_second(&self) -> f64
pub fn get_events_per_second(&self) -> f64
Get current events per second rate (lock-free)
Sourcepub fn get_avg_latency_nanos(&self) -> u64
pub fn get_avg_latency_nanos(&self) -> u64
Get current average latency in nanoseconds (lock-free)