]> git.kaiwu.me - haproxy.git/commit
CLEANUP: haload: factor out the per-thread rate share computation
authorFrederic Lecaille <flecaille@haproxy.com>
Mon, 24 Aug 2026 10:14:04 +0000 (12:14 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Mon, 24 Aug 2026 17:16:05 +0000 (19:16 +0200)
commitb6b8ba303ac1e28b708cb526a00b68723b83bf9b
tree660f996d8e3cd86f43dc225a435d6ffd602f1e27
parent9678eb872a0823d8e170ac15f102fa7c7cbfb7a1
CLEANUP: haload: factor out the per-thread rate share computation

hld_usr_schedule(), hld_usr_task(), and hld_rate_task() each had the
same three lines to compute this thread's exact share of a rate
(throttle-aware, or not). Move this into hld_thr_rate_share() and call
it from all three places instead.

Also fix a typo in hld_usr_schedule()'s comment (<urs> -> <usr>).
src/haload.c