]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: counters: move last_change into counters struct
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 30 Apr 2024 10:04:57 +0000 (12:04 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 2 May 2024 08:55:25 +0000 (10:55 +0200)
commit634cc2a5d84123303b61bf0d6311925b96cdaf3b
tree039c996b118cedb6587a1d794603d05907f4a511
parent9b35e1f30cd64b9117f4f0b4df685aa90c536f39
MINOR: counters: move last_change into counters struct

last_change was a member present in both proxy and server struct. It is
used as an age statistics to report the last update of the object.

Move last_change into fe_counters/be_counters. This is necessary to be
able to manipulate it through generic stat column and report it into
stats-file.

Note that there is a change for proxy structure with now 2 different
last_change values, on frontend and backend side. Special care was taken
to ensure that the value is initialized only on the proxy side. The
other value is set to 0 unless a listen proxy is instantiated. For the
moment, only backend counter is reported in stats. However, with now two
distinct values, stats could be extended to report it on both side.
16 files changed:
include/haproxy/counters-t.h
include/haproxy/proxy-t.h
include/haproxy/server-t.h
src/backend.c
src/check.c
src/cli.c
src/flt_spoe.c
src/log.c
src/peers.c
src/proxy.c
src/queue.c
src/resolvers.c
src/server.c
src/server_state.c
src/sink.c
src/stats.c