]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
show keep-alive ratio in server_list output
authorwessels <>
Sat, 1 Nov 1997 03:46:23 +0000 (03:46 +0000)
committerwessels <>
Sat, 1 Nov 1997 03:46:23 +0000 (03:46 +0000)
src/http.cc
src/stat.cc

index 493bbadb85bf3499fd95d9f3b7fb6c4d0bdbe9b8..e1d8ce194148b3a2709041f248d9c6ed3e566cd0 100644 (file)
@@ -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)
index 2976524a3e22ce85df9390039e21bc7373220d16..d8619e1ae4e205f451290f9354ab564a0ee7f35d 100644 (file)
@@ -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);
 }