]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stats: support age in stats-file
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 30 Apr 2024 12:09:36 +0000 (14:09 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 2 May 2024 08:55:25 +0000 (10:55 +0200)
commite92ae8f0bab0801b8b72889255bec9e34ad02067
treeebd6fffaeb9afbdfe7d2eaf16a6b744783a21abd
parent634cc2a5d84123303b61bf0d6311925b96cdaf3b
MINOR: stats: support age in stats-file

Extend generic stat column support to be able to fully support age stats
type. Several changes were required.

On output, me_generate_field() has been updated to report the difference
between the current tick with the stored value for FN_AGE type. Also, if
an age stats is hidden in show stats, -1 is returned instead of an empty
metric, which is the value to mark an age as unset.

On counters preload, load_ctr() was updated to handled FN_AGE. A similar
substraction is performed to the current tick value.
src/stats-file.c
src/stats.c