Module pareto

Source
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.
MsecDuration 🔒
A circuit build time or timeout duration, measured in milliseconds.
Params 🔒
A set of parameters determining the behavior of a ParetoTimeoutEstimator.
ParetoDist 🔒
A Pareto distribution, for use in estimating timeouts.
ParetoTimeoutEstimator 🔒
Tor’s default circuit build timeout estimator.
ParetoTimeoutState 🔒
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?