#[repr(align(64))]pub struct ConnectionMetrics {
pub websocket_pings_sent: AtomicU64,
pub websocket_pongs_received: AtomicU64,
pub json_pings_sent: AtomicU64,
pub json_pongs_received: AtomicU64,
pub messages_sent: AtomicU64,
pub messages_received: AtomicU64,
pub authentication_attempts: AtomicU64,
pub reconnection_attempts: AtomicU64,
pub successful_reconnections: AtomicU64,
pub failed_reconnections: AtomicU64,
}Expand description
Connection metrics for observability Cache-line aligned to prevent false sharing in multi-threaded scenarios
Fields§
§websocket_pings_sent: AtomicU64Number of WebSocket protocol ping frames sent
websocket_pongs_received: AtomicU64Number of WebSocket protocol pong frames received
json_pings_sent: AtomicU64Number of JSON ping messages sent for application-level keepalive
json_pongs_received: AtomicU64Number of JSON pong responses received from server
messages_sent: AtomicU64Total number of messages sent to the server
messages_received: AtomicU64Total number of messages received from the server
authentication_attempts: AtomicU64Number of authentication attempts made
reconnection_attempts: AtomicU64Number of reconnection attempts initiated
successful_reconnections: AtomicU64Number of successful reconnection attempts
failed_reconnections: AtomicU64Number of failed reconnection attempts
Trait Implementations§
Source§impl Debug for ConnectionMetrics
impl Debug for ConnectionMetrics
Source§impl Default for ConnectionMetrics
impl Default for ConnectionMetrics
Source§fn default() -> ConnectionMetrics
fn default() -> ConnectionMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ConnectionMetrics
impl RefUnwindSafe for ConnectionMetrics
impl Send for ConnectionMetrics
impl Sync for ConnectionMetrics
impl Unpin for ConnectionMetrics
impl UnwindSafe for ConnectionMetrics
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