]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: thread: report the wait time buckets for lock classes
authorWilly Tarreau <w@1wt.eu>
Mon, 10 Feb 2025 09:41:35 +0000 (10:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 10 Feb 2025 17:34:43 +0000 (18:34 +0100)
commita22550fbd753e7ae51f9af1d678e96fab120a77e
tree9c296d01ef7c97145c1c32ced25532bd0f383129
parent0b849c59fbd0091d4c2bfb1f7a6faa009573f6c5
DEBUG: thread: report the wait time buckets for lock classes

In addition to the total/average wait time, we now also store the
wait time in 2^N buckets. There are 32 buckets for each type (read,
seek, write), allowing to store wait times from 1-2ns to 2.1-4.3s,
which is quite sufficient, even if we'd want to switch from NS to
CPU cycles in the future. The counters are only reported for non-
zero buckets so as not to visually pollute the output.

This significantly inflates the lock_stat struct, which is now
aligned to 256 bytes and rounded up to 1kB. But that's not really
a problem, given that there's only one per lock label.
include/haproxy/thread-t.h
src/thread.c