const RATE_TAU: f64 = 15.0;Expand description
Time constant for the rate average.
The reported rate reflects roughly the last RATE_TAU seconds of transfer.
This has to be long: hf-xet can flush to disk only every couple of
seconds, and the residual ripple for a burst arriving every P seconds is
approximately ±P / (2 * RATE_TAU). At 15s a 2-second burst period ripples
by under 7%, which reads as steady; at 5s the same input ripples by 20%,
which is exactly the jitter this module exists to remove.
15s is also what indicatif’s own estimator uses for its weighting horizon.
The cost is response time: a genuine change in throughput is tracked with a
15s time constant, which is imperceptible against a multi-minute download.