]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stats: support rate in stats-file
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 29 Apr 2024 14:34:22 +0000 (16:34 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 2 May 2024 08:55:25 +0000 (10:55 +0200)
commitfec2ae9b7688a8dfc2f3d492478975361c3bc437
treefe5f65255971167317adfe2a969e96cf33fbaa62
parent639e73f8f29859efb4ce7adc712aeba1685a57c0
MINOR: stats: support rate in stats-file

Implement support for FN_RATE stat column into stat-file.

For the output part, only minimal change is required. Reuse the function
read_freq_ctr() to print the same value in both stats output and
stats-file dump.

For counter preloading, define a new utility function
preload_freq_ctr(). This can be used to initialize a freq-ctr type by
preloading previous period value. Reuse this function in load_ctr()
during stats-file parsing.

At the moment, no rate column is defined as generic. Thus, this commit
does not have functional change. This will be changed as soon as FN_RATE
are converted to generic columns.
include/haproxy/freq_ctr.h
src/stats-file.c
src/stats.c