Expand description
Implement Tor’s sort-of-Pareto estimator for circuit build timeouts.
Our build times don’t truly follow a Pareto distribution; instead they seem to be closer to a Fréchet distribution. But those are hard to work with, and we only care about the right tail, so we’re using Pareto instead.
This estimator also includes several heuristics and kludges to
try to behave better on unreliable networks.
For more information on the exact algorithms and their rationales,
see path-spec.txt
.
Modules§
- assertion 🔒
- Module to hold calls to const_assert.
Structs§
- History 🔒
- A history of circuit timeout observations, used to estimate our likely circuit timeouts.
- Msec
Duration 🔒 - A circuit build time or timeout duration, measured in milliseconds.
- Params 🔒
- A set of parameters determining the behavior of a ParetoTimeoutEstimator.
- Pareto
Dist 🔒 - A Pareto distribution, for use in estimating timeouts.
- Pareto
Timeout 🔒Estimator - Tor’s default circuit build timeout estimator.
- Pareto
Timeout 🔒State - An object used to serialize our timeout history for persistent state.
Constants§
- BUCKET_
WIDTH_ 🔒MSEC - How many milliseconds wide is each bucket in our histogram?
- SUCCESS_
HISTORY_ 🔒DEFAULT_ LEN - How many circuit success-versus-timeout observations do we record by default?
- TIME_
HISTORY_ 🔒LEN - How many circuit build time observations do we record?