]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stats: allow to select one field in `stats_fill_fe_stats`
authorWilliam Dauchy <wdauchy@gmail.com>
Sun, 17 Jan 2021 17:27:45 +0000 (18:27 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 21 Jan 2021 17:59:30 +0000 (18:59 +0100)
commit0ef54397b0e0387cb35e7b73ac5562972a678572
tree848883579b914241d4133d23618a6978745e4216
parenta191b77e54c26a97064cb42ab4927d4f5c95b896
MEDIUM: stats: allow to select one field in `stats_fill_fe_stats`

prometheus approach requires to output all values for a given metric
name; meaning we iterate through all metrics, and then iterate in the
inner loop on all objects for this metric.
In order to allow more code reuse, adapt the stats API to be able to
select one field or fill them all otherwise.
From this patch it should be possible to remove most of the duplicate
code on prometheuse side for the frontend.

Signed-off-by: William Dauchy <wdauchy@gmail.com>
include/haproxy/stats.h
src/hlua_fcn.c
src/stats.c