[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.
This commit is contained in:
Krzysztof Piotr Oledzki
2009-10-04 14:52:57 +02:00
committed by Willy Tarreau
parent 8d06b8b8db
commit 052d4fd07d
14 changed files with 114 additions and 126 deletions

View File

@@ -66,9 +66,9 @@ static inline void proxy_reset_timeouts(struct proxy *proxy)
}
/* 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 @@ static void inline proxy_inc_fe_ctr(struct proxy *fe)
/* 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;

View File

@@ -38,7 +38,7 @@ int srv_getinter(struct server *s);
/* 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;