Struct mixnet::core::RequestMetrics
source · pub struct RequestMetrics {
pub num_hops: usize,
pub per_hop_net_delay: Duration,
pub forwarding_delay: Duration,
pub authored_packet_queue_delay: Duration,
}
Expand description
Metrics that can be used to estimate a request’s round-trip time.
Fields§
§num_hops: usize
The maximum number of hops for any of the fragments to reach the destination, plus the maximum number of hops for any of the SURBs to come back.
per_hop_net_delay: Duration
Conservative estimate of the network (and processing) delay per hop.
forwarding_delay: Duration
The maximum total forwarding delay for any request fragment, plus the maximum total forwarding delay for any SURB.
A conservative estimate of the total delay through the authored packet queues at the source and destination.
Implementations§
source§impl RequestMetrics
impl RequestMetrics
sourcepub fn estimate_rtt(&self, handling_delay: Duration) -> Duration
pub fn estimate_rtt(&self, handling_delay: Duration) -> Duration
Returns a conservative estimate of the round-trip time, suitable for use as a timeout.
handling_delay
should be a conservative estimate of the time taken to handle the request
at the destination and post the reply.
Auto Trait Implementations§
impl Freeze for RequestMetrics
impl RefUnwindSafe for RequestMetrics
impl Send for RequestMetrics
impl Sync for RequestMetrics
impl Unpin for RequestMetrics
impl UnwindSafe for RequestMetrics
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
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>
Converts
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>
Converts
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