#[repr(align(64))]pub struct ConnectionStats {
pub messages_received: u64,
pub messages_sent: u64,
pub reconnections: u32,
pub bytes_received: u64,
pub bytes_sent: u64,
pub last_message_time: u64,
pub last_ping_time: u64,
pub last_pong_time: u64,
pub avg_latency_ns: u64,
pub connected_time: u64,
pub errors: u32,
}Expand description
Connection statistics for performance monitoring
Fields§
§messages_received: u64Number of messages received
messages_sent: u64Number of messages sent
reconnections: u32Number of successful reconnections
bytes_received: u64Total bytes received
bytes_sent: u64Total bytes sent
last_message_time: u64Last message received timestamp (nanoseconds)
last_ping_time: u64Last ping timestamp (nanoseconds)
last_pong_time: u64Last pong timestamp (nanoseconds)
avg_latency_ns: u64Average message processing latency (nanoseconds)
connected_time: u64Connection established timestamp (nanoseconds)
errors: u32Number of errors encountered
Trait Implementations§
Source§impl Clone for ConnectionStats
impl Clone for ConnectionStats
Source§fn clone(&self) -> ConnectionStats
fn clone(&self) -> ConnectionStats
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectionStats
impl Debug for ConnectionStats
Source§impl Default for ConnectionStats
impl Default for ConnectionStats
Source§fn default() -> ConnectionStats
fn default() -> ConnectionStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConnectionStats
impl RefUnwindSafe for ConnectionStats
impl Send for ConnectionStats
impl Sync for ConnectionStats
impl Unpin for ConnectionStats
impl UnwindSafe for ConnectionStats
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