pub struct ConnectionStats {Show 20 fields
pub connection_attempts: u64,
pub successful_connections: u64,
pub failed_connections: u64,
pub disconnections: u64,
pub reconnections: u64,
pub avg_connection_latency_ms: f64,
pub last_connection_latency_ms: f64,
pub total_uptime_seconds: f64,
pub current_uptime_seconds: f64,
pub time_since_last_disconnection_seconds: f64,
pub messages_sent: u64,
pub messages_received: u64,
pub bytes_sent: u64,
pub bytes_received: u64,
pub avg_messages_sent_per_second: f64,
pub avg_messages_received_per_second: f64,
pub avg_bytes_sent_per_second: f64,
pub avg_bytes_received_per_second: f64,
pub is_connected: bool,
pub connection_history: Vec<ConnectionEvent>,
}Expand description
Comprehensive connection statistics for WebSocket testing
Fields§
§connection_attempts: u64Total number of connection attempts
successful_connections: u64Total number of successful connections
failed_connections: u64Total number of failed connections
disconnections: u64Total number of disconnections
reconnections: u64Total number of reconnections
avg_connection_latency_ms: f64Average connection latency in milliseconds
last_connection_latency_ms: f64Last connection latency in milliseconds
total_uptime_seconds: f64Total uptime in seconds
current_uptime_seconds: f64Current connection uptime in seconds (if connected)
time_since_last_disconnection_seconds: f64Time since last disconnection in seconds
messages_sent: u64Messages sent count
messages_received: u64Messages received count
bytes_sent: u64Total bytes sent
bytes_received: u64Total bytes received
avg_messages_sent_per_second: f64Average messages per second (sent)
avg_messages_received_per_second: f64Average messages per second (received)
avg_bytes_sent_per_second: f64Average bytes per second (sent)
avg_bytes_received_per_second: f64Average bytes per second (received)
is_connected: boolIs currently connected
connection_history: Vec<ConnectionEvent>Connection history (last 10 connections)
Implementations§
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§fn clone_from(&mut self, source: &Self)
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§impl<'de> Deserialize<'de> for ConnectionStats
impl<'de> Deserialize<'de> for ConnectionStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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 UnsafeUnpin 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