mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-18 13:36:41 +02:00
MINOR: stats: compute the ratio of compressed response based on 2xx responses
Since only responses with status 200 can be compressed, let's only count the ratio of compressed responses on the basis of the 2xx responses and not all of them. Note that responses 206 are still included in this count but it gives a better figure, especially for places where authentication is used and 401 is common.
This commit is contained in:
@@ -2478,7 +2478,7 @@ static int stats_dump_proxy(struct stream_interface *si, struct proxy *px, struc
|
||||
chunk_appendf(&trash, " compressed=%lld (%d%%)",
|
||||
px->fe_counters.p.http.comp_rsp,
|
||||
px->fe_counters.p.http.cum_req ?
|
||||
(int)(100*px->fe_counters.p.http.comp_rsp/px->fe_counters.p.http.cum_req) : 0);
|
||||
(int)(100*px->fe_counters.p.http.comp_rsp/px->fe_counters.p.http.rsp[2]) : 0);
|
||||
chunk_appendf(&trash, " intercepted=%lld\"", px->fe_counters.intercepted_req);
|
||||
}
|
||||
|
||||
@@ -3219,7 +3219,7 @@ static int stats_dump_proxy(struct stream_interface *si, struct proxy *px, struc
|
||||
chunk_appendf(&trash, " compressed=%lld (%d%%)\"",
|
||||
px->be_counters.p.http.comp_rsp,
|
||||
px->be_counters.p.http.cum_req ?
|
||||
(int)(100*px->be_counters.p.http.comp_rsp/px->be_counters.p.http.cum_req) : 0);
|
||||
(int)(100*px->be_counters.p.http.comp_rsp/px->be_counters.p.http.rsp[2]) : 0);
|
||||
}
|
||||
|
||||
chunk_appendf(&trash,
|
||||
|
||||
Reference in New Issue
Block a user