]> git.kaiwu.me - haproxy.git/commit
MINOR: freq_ctr: add a function to add values with a peak
authorWilly Tarreau <w@1wt.eu>
Thu, 19 Mar 2026 14:08:29 +0000 (15:08 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 Mar 2026 15:24:31 +0000 (16:24 +0100)
commiteec60f14ddbfd77d864d03c8db3f052c74a1f2f9
treec386e291c4f62e3fcc66e8387635b2d3d6e03d93
parentfc38ebb07909e66d90734b6e9a68b83a51228e69
MINOR: freq_ctr: add a function to add values with a peak

Sometimes it's desirable to observe fading away peak values, where a new
value that is higher than the historical one instantly replaces it,
otherwise contributes to it. It is convenient when trying to observe
certain phenomenons like peak queue sizes. The new function
swrate_add_peak_local() does that to a private variable (no atomic ops
involved as it's not worth the cost since such use cases are typically
local).
include/haproxy/freq_ctr.h