pub struct ConnectionStats {
pub rtt_ms: f32,
pub rtt_p50_ms: f32,
pub rtt_p99_ms: f32,
pub jitter_ms: f32,
pub packet_loss_pct: f32,
pub kbps_sent: f32,
pub kbps_recv: f32,
}Expand description
Snapshot of per-connection network diagnostics.
All fields are rolling averages or short-window estimates; they are
computed on demand (poll-style) and incur no per-tick allocation.
Obtain via Server::connection_stats(&user_key) or Client::connection_stats().
Fields§
§rtt_ms: f32Round-trip time in milliseconds (EWMA).
rtt_p50_ms: f32RTT 50th-percentile in milliseconds, estimated from the last 32 samples.
rtt_p99_ms: f32RTT 99th-percentile in milliseconds, estimated from the last 32 samples.
jitter_ms: f32Jitter in milliseconds (EWMA of half the absolute RTT deviation).
packet_loss_pct: f32Fraction of sent data-packets that were not acknowledged in the last 64-packet window. Range: 0.0 (no loss) – 1.0 (total loss).
kbps_sent: f32Rolling-average outgoing bandwidth in kilobits per second.
kbps_recv: f32Rolling-average incoming bandwidth in kilobits per second.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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