mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-04 19:19:33 +00:00
627505d36a
Some samples representing time will cover more than one sample at once if they are units of time per time. For this we'd need to have the ability to loop over swrate_add() multiple times but that would be inefficient. By developing the function elevated to power N, it's visible that some coefficients quickly disappear and that those which remain at the first order more or less compensate each other. Thus a simplified version of this function was added to provide a single value for a given number of samples. Tests with multiple values, window sizes and sample sizes have shown that it is possible to make it remain surprisingly accurate (typical error < 0.2% over various large window and sample sizes, even samples representing up to 1/4 of the window). |
||
---|---|---|
.. | ||
common | ||
import | ||
proto | ||
types |