]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stats: add by HTTP version cumulated number of sessions and requests
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 18 Jan 2023 10:52:21 +0000 (11:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Feb 2023 16:55:49 +0000 (17:55 +0100)
commit9969adbcdc1a79a6e8bb0a6283191d8d330a04f1
treee2a20bc566885e6a705c08f12f2c6a73758fc907
parent1ea5f410fff44170ea4be5c74c5ab1ff45209a52
MINOR: stats: add by HTTP version cumulated number of sessions and requests

Add cum_sess_ver[] new array of counters to count the number of cumulated
HTTP sessions by version (h1, h2 or h3).
Implement proxy_inc_fe_cum_sess_ver_ctr() to increment these counter.
This function is called each a HTTP mux is correctly initialized. The QUIC
must before verify the application operations for the mux is for h3 before
calling proxy_inc_fe_cum_sess_ver_ctr().
ST_F_SESS_OTHER stat field for the cumulated of sessions others than
HTTP sessions is deduced from ->cum_sess_ver counter (for all the session,
not only HTTP sessions) from which the HTTP sessions counters are substracted.

Add cum_req[] new array of counters to count the number of cumulated HTTP
requests by version and others than HTTP requests. This new member replace ->cum_req.
Modify proxy_inc_fe_req_ctr() which increments these counters to pass an HTTP
version, 0 special values meaning "other than an HTTP request". This is the case
for instance for syslog.c from which proxy_inc_fe_req_ctr() is called with 0
as version parameter.
ST_F_REQ_TOT stat field compputing for the cumulated number of requests is modified
to count the sum of all the cum_req[] counters.

As this patch is useful for QUIC, it must be backported to 2.7.
include/haproxy/counters-t.h
include/haproxy/proxy.h
include/haproxy/stats-t.h
src/http_ana.c
src/log.c
src/mux_h1.c
src/mux_h2.c
src/mux_quic.c
src/stats.c