From: wessels <> Date: Sat, 1 Nov 1997 03:46:23 +0000 (+0000) Subject: show keep-alive ratio in server_list output X-Git-Tag: SQUID_3_0_PRE1~4594 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9a75cc4df2be1a1938ed6028dca3a149863910df;p=thirdparty%2Fsquid.git show keep-alive ratio in server_list output --- diff --git a/src/http.cc b/src/http.cc index 493bbadb85..e1d8ce1941 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.212 1997/10/31 20:37:06 wessels Exp $ + * $Id: http.cc,v 1.213 1997/10/31 20:46:23 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -905,7 +905,8 @@ httpSendRequest(int fd, void *data) BIT_SET(httpState->flags, HTTP_PROXYING); if (req->method == METHOD_GET) { if (p) { - d = (double) p->stats.n_keepalives_recv / (double) ++p->stats.n_keepalives_sent; + d = (double) p->stats.n_keepalives_recv / + (double) ++p->stats.n_keepalives_sent; if ((xcount++ & 0x3F) == 0) debug(0, 0) ("%s Keepalive Ratio = %f\n", p->host, d); if (d > 0.50 || p->stats.n_keepalives_sent < 10) diff --git a/src/stat.cc b/src/stat.cc index 2976524a3e..d8619e1ae4 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.164 1997/10/27 22:54:38 wessels Exp $ + * $Id: stat.cc,v 1.165 1997/10/31 20:46:24 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -445,6 +445,8 @@ dump_peers(StoreEntry * sentry, peer * peers) storeAppendPrintf(sentry, "!%s ", d->domain); } storeAppendPrintf(sentry, close_bracket); /* } */ + storeAppendPrintf(sentry, "{Keep-Alive Ratio: %d%%}\n", + percent(e->stats.n_keepalives_recv, e->stats.n_keepalives_sent)); } storeAppendPrintf(sentry, close_bracket); }