pub struct ConnectionTiming { /* private fields */ }Expand description
Timing stats for the establishment of a connection. All durations are calculated from the start of the connection.
Implementations§
Source§impl ConnectionTiming
impl ConnectionTiming
Sourcepub fn new(start: Timestamp) -> Self
pub fn new(start: Timestamp) -> Self
Creates a new ConnectionTiming.
Sourcepub fn set_lookup(&mut self, at: Timestamp)
pub fn set_lookup(&mut self, at: Timestamp)
Set the time it took to perform DNS resolution of the peer’s host.
Sourcepub fn set_connect(&mut self, at: Timestamp)
pub fn set_connect(&mut self, at: Timestamp)
Set the time it took to create the connection with the remote peer.
Sourcepub fn set_secure(&mut self, at: Timestamp)
pub fn set_secure(&mut self, at: Timestamp)
Set the time it took to secure a connection.
Sourcepub fn set_application(&mut self, at: Timestamp)
pub fn set_application(&mut self, at: Timestamp)
Set the time it took to setup the L7 protocol, H1/2/3.
Sourcepub fn time_lookup(&self) -> Duration
pub fn time_lookup(&self) -> Duration
Returns how long it took for DNS to resolve.
Sourcepub fn time_connect(&self) -> Duration
pub fn time_connect(&self) -> Duration
Returns how long it took for the transport to connect.
Sourcepub fn set_dns_lookup(&mut self, duration: Duration)
pub fn set_dns_lookup(&mut self, duration: Duration)
Set the duration of the DNS lookup
Sourcepub fn time_secure(&self) -> Duration
pub fn time_secure(&self) -> Duration
Returns how long it took for the security handshake to complete.
Sourcepub fn time_application(&self) -> Duration
pub fn time_application(&self) -> Duration
Returns how long it took for the H/{1,2,3} handshake to complete.
Sourcepub fn set_tls_round_trips(&mut self, round_trips: u32)
pub fn set_tls_round_trips(&mut self, round_trips: u32)
Sets the number of round-trips the TLS handshake took.
Sourcepub fn tls_round_trips(&self) -> u32
pub fn tls_round_trips(&self) -> u32
Returns the number of round-trips the TLS handshake took (>= 1).
Sourcepub fn tcp_handshake(&self) -> Duration
pub fn tcp_handshake(&self) -> Duration
The duration of the TCP handshake alone (excluding DNS resolution),
i.e. tcp_f in draft-ietf-ippm-responsiveness-09 §5.3.
This is the interval between the transport starting to connect and the
connection being established. When the connection timing starts after
DNS resolution (as it does for the responsiveness probes), time_lookup
is zero and this is simply time_connect.
Sourcepub fn tls_handshake(&self) -> Duration
pub fn tls_handshake(&self) -> Duration
The duration of the TLS handshake alone (excluding the preceding TCP
handshake), i.e. the un-normalized tls_f in
draft-ietf-ippm-responsiveness-09 §5.3.
For QUIC/H3 connections time_secure is zero (TLS is folded into the
transport handshake), so this saturates to zero rather than underflowing.
Divide by Self::tls_round_trips to obtain the normalized value.
Trait Implementations§
Source§impl Clone for ConnectionTiming
impl Clone for ConnectionTiming
impl Copy for ConnectionTiming
Source§impl Debug for ConnectionTiming
impl Debug for ConnectionTiming
impl Eq for ConnectionTiming
Source§impl Ord for ConnectionTiming
impl Ord for ConnectionTiming
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ConnectionTiming
impl PartialEq for ConnectionTiming
Source§impl PartialOrd for ConnectionTiming
impl PartialOrd for ConnectionTiming
impl StructuralPartialEq for ConnectionTiming
Auto Trait Implementations§
impl Freeze for ConnectionTiming
impl RefUnwindSafe for ConnectionTiming
impl Send for ConnectionTiming
impl Sync for ConnectionTiming
impl Unpin for ConnectionTiming
impl UnsafeUnpin for ConnectionTiming
impl UnwindSafe for ConnectionTiming
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.