pub struct Metrics {Show 17 fields
pub connections_total: AtomicU64,
pub connections_active: AtomicU64,
pub handshakes_total: AtomicU64,
pub handshakes_success: AtomicU64,
pub handshakes_failed: AtomicU64,
pub messages_sent: AtomicU64,
pub messages_received: AtomicU64,
pub bytes_sent: AtomicU64,
pub bytes_received: AtomicU64,
pub compression_total: AtomicU64,
pub compression_success: AtomicU64,
pub encryption_total: AtomicU64,
pub encryption_success: AtomicU64,
pub replay_cache_hits: AtomicU64,
pub replay_cache_misses: AtomicU64,
pub connection_errors: AtomicU64,
pub protocol_errors: AtomicU64,
/* private fields */
}Expand description
Global metrics collector for protocol operations
Fields§
§connections_total: AtomicU64Total connections established
connections_active: AtomicU64Currently active connections
handshakes_total: AtomicU64Total handshake attempts
handshakes_success: AtomicU64Successful handshakes
handshakes_failed: AtomicU64Failed handshakes
messages_sent: AtomicU64Total messages sent
messages_received: AtomicU64Total messages received
bytes_sent: AtomicU64Total bytes sent
bytes_received: AtomicU64Total bytes received
compression_total: AtomicU64Total compression operations
compression_success: AtomicU64Successful compression operations
encryption_total: AtomicU64Total encryption operations
encryption_success: AtomicU64Successful encryption operations
replay_cache_hits: AtomicU64Total replay cache hits
replay_cache_misses: AtomicU64Total replay cache misses
connection_errors: AtomicU64Connection errors
protocol_errors: AtomicU64Protocol errors
Implementations§
Source§impl Metrics
impl Metrics
Sourcepub fn connection_established(&self)
pub fn connection_established(&self)
Record a new connection
Sourcepub fn connection_closed(&self)
pub fn connection_closed(&self)
Record a connection closed
Sourcepub fn handshake_attempt(&self)
pub fn handshake_attempt(&self)
Record a handshake attempt
Sourcepub fn handshake_success(&self)
pub fn handshake_success(&self)
Record a successful handshake
Sourcepub fn handshake_failed(&self)
pub fn handshake_failed(&self)
Record a failed handshake
Sourcepub fn message_sent(&self, byte_count: u64)
pub fn message_sent(&self, byte_count: u64)
Record a message sent
Sourcepub fn message_received(&self, byte_count: u64)
pub fn message_received(&self, byte_count: u64)
Record a message received
Sourcepub fn compression_attempt(&self)
pub fn compression_attempt(&self)
Record a compression attempt
Sourcepub fn compression_success(&self)
pub fn compression_success(&self)
Record a successful compression
Sourcepub fn encryption_attempt(&self)
pub fn encryption_attempt(&self)
Record an encryption attempt
Sourcepub fn encryption_success(&self)
pub fn encryption_success(&self)
Record a successful encryption
Sourcepub fn replay_cache_hit(&self)
pub fn replay_cache_hit(&self)
Record a replay cache hit
Sourcepub fn replay_cache_miss(&self)
pub fn replay_cache_miss(&self)
Record a replay cache miss
Sourcepub fn connection_error(&self)
pub fn connection_error(&self)
Record a connection error
Sourcepub fn protocol_error(&self)
pub fn protocol_error(&self)
Record a protocol error
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Get current metrics snapshot
Sourcepub fn log_metrics(&self)
pub fn log_metrics(&self)
Log current metrics