mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 23:14:46 +00: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:
parent
d300261bab
commit
5730c68b46
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user