Skip to main content

Module timeouts

Module timeouts 

Source
Expand description

Code for estimating good values for circuit timeouts.

We need good circuit timeouts for two reasons: first, they help user experience. If user wait too long for their circuits, or if they use exceptionally slow circuits, then Tor will feel really slow. Second, these timeouts are actually a security property.

Re-exportsยง

use std::time::Duration; ๐Ÿ”’
pub(crate) use estimator::Estimator; ๐Ÿ”’

Modulesยง

estimator ๐Ÿ”’
Declarations for a TimeoutEstimator type that can change implementation.
pareto ๐Ÿ”’
Implement Torโ€™s sort-of-Pareto estimator for circuit build timeouts.
readonly ๐Ÿ”’
Implement a timeout estimator that just uses another processโ€™s estimates.

Enumsยง

Action
A possible action for which we can try to estimate a timeout.

Traitsยง

TimeoutEstimator ๐Ÿ”’
An object that calculates circuit timeout thresholds from the history of circuit build times.

Functionsยง

mul_duration_f64_saturating ๐Ÿ”’
A safe variant of Duration::mul_f64 that never panics.