pub struct PathStats {Show 24 fields
pub local_addr: SocketAddr,
pub peer_addr: SocketAddr,
pub validation_state: PathState,
pub active: bool,
pub recv: usize,
pub sent: usize,
pub lost: usize,
pub retrans: usize,
pub total_pto_count: usize,
pub dgram_recv: usize,
pub dgram_sent: usize,
pub rtt: Duration,
pub min_rtt: Option<Duration>,
pub max_rtt: Option<Duration>,
pub rttvar: Duration,
pub cwnd: usize,
pub sent_bytes: u64,
pub recv_bytes: u64,
pub lost_bytes: u64,
pub stream_retrans_bytes: u64,
pub pmtu: usize,
pub delivery_rate: u64,
pub max_bandwidth: Option<u64>,
pub startup_exit: Option<StartupExit>,
}Expand description
Statistics about the path of a connection.
A connection’s path statistics can be collected using the path_stats()
method.
Fields§
§local_addr: SocketAddrThe local address of the path.
peer_addr: SocketAddrThe peer address of the path.
validation_state: PathStateThe path validation state.
active: boolWhether the path is marked as active.
recv: usizeThe number of QUIC packets received.
sent: usizeThe number of QUIC packets sent.
lost: usizeThe number of QUIC packets that were lost.
retrans: usizeThe number of sent QUIC packets with retransmitted data.
total_pto_count: usizeThe number of times PTO (probe timeout) fired.
Loss usually happens in a burst so the number of packets lost will depend on the volume of inflight packets at the time of loss (which can be arbitrary). PTO count measures the number of loss events and provides a normalized loss metric.
dgram_recv: usizeThe number of DATAGRAM frames received.
dgram_sent: usizeThe number of DATAGRAM frames sent.
rtt: DurationThe estimated round-trip time of the connection.
min_rtt: Option<Duration>The minimum round-trip time observed.
max_rtt: Option<Duration>The maximum round-trip time observed.
rttvar: DurationThe estimated round-trip time variation in samples using a mean variation.
cwnd: usizeThe size of the connection’s congestion window in bytes.
sent_bytes: u64The number of sent bytes.
recv_bytes: u64The number of received bytes.
lost_bytes: u64The number of bytes lost.
stream_retrans_bytes: u64The number of stream bytes retransmitted.
pmtu: usizeThe current PMTU for the connection.
delivery_rate: u64The most recent data delivery rate estimate in bytes/s.
Note that this value could be inaccurate if the application does not
respect pacing hints (see SendInfo.at and Pacing for more
details).
max_bandwidth: Option<u64>The maximum bandwidth estimate for the connection in bytes/s.
Note: not all congestion control algorithms provide this metric; it is currently only implemented for bbr2_gcongestion.
startup_exit: Option<StartupExit>Statistics from when a CCA first exited the startup phase.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PathStats
impl RefUnwindSafe for PathStats
impl Send for PathStats
impl Sync for PathStats
impl Unpin for PathStats
impl UnwindSafe for PathStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more