[CLEANUP] Move counters to dedicated structures
Move counters from "struct proxy" and "struct server"
to "struct pxcounters" and "struct svcounters".
This patch should make no functional change.
diff --git a/include/proto/proxy.h b/include/proto/proxy.h
index 0ad1e7f..f293b1b 100644
--- a/include/proto/proxy.h
+++ b/include/proto/proxy.h
@@ -66,9 +66,9 @@
}
/* increase the number of cumulated connections on the designated frontend */
-static void inline proxy_inc_fe_ctr(struct proxy *fe)
+static void inline proxy_inc_fe_ctr(struct listener *l, struct proxy *fe)
{
- fe->cum_feconn++;
+ fe->counters.cum_feconn++;
update_freq_ctr(&fe->fe_sess_per_sec, 1);
if (fe->fe_sess_per_sec.curr_ctr > fe->fe_sps_max)
fe->fe_sps_max = fe->fe_sess_per_sec.curr_ctr;
@@ -77,7 +77,7 @@
/* increase the number of cumulated connections on the designated backend */
static void inline proxy_inc_be_ctr(struct proxy *be)
{
- be->cum_beconn++;
+ be->counters.cum_beconn++;
update_freq_ctr(&be->be_sess_per_sec, 1);
if (be->be_sess_per_sec.curr_ctr > be->be_sps_max)
be->be_sps_max = be->be_sess_per_sec.curr_ctr;
diff --git a/include/proto/server.h b/include/proto/server.h
index 7479c2e..43d9216 100644
--- a/include/proto/server.h
+++ b/include/proto/server.h
@@ -38,7 +38,7 @@
/* increase the number of cumulated connections on the designated server */
static void inline srv_inc_sess_ctr(struct server *s)
{
- s->cum_sess++;
+ s->counters.cum_sess++;
update_freq_ctr(&s->sess_per_sec, 1);
if (s->sess_per_sec.curr_ctr > s->sps_max)
s->sps_max = s->sess_per_sec.curr_ctr;