From: Fabian Keil <fk@fabiankeil.de>
Date: Sat, 16 Oct 2010 13:32:32 +0000 (+0000)
Subject: In print_stats(), also provide the percentage of keep-alive offers the client accepted.
X-Git-Tag: v_3_0_17~81
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/%22https:/static/diff?a=commitdiff_plain;h=ea4407ba0a6dd361d1eea922d4f7709bc6973836;p=privoxy.git

In print_stats(), also provide the percentage of keep-alive offers the client accepted.
---

diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl
index 61cd5894..eb04bc69 100755
--- a/tools/privoxy-log-parser.pl
+++ b/tools/privoxy-log-parser.pl
@@ -8,7 +8,7 @@
 #
 # http://www.fabiankeil.de/sourcecode/privoxy-log-parser/
 #
-# $Id: privoxy-log-parser.pl,v 1.92 2010/08/28 13:22:00 fabiankeil Exp $
+# $Id: privoxy-log-parser.pl,v 1.93 2010/08/28 13:22:19 fabiankeil Exp $
 #
 # TODO:
 #       - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting
@@ -1979,7 +1979,9 @@ sub print_stats () {
     print "New outgoing connections: " . $new_connections . " (" .
         get_percentage($stats{requests}, $new_connections) . ")\n";
     print "Reused connections: " . $stats{'reused-connections'} . " (" .
-        get_percentage($stats{requests}, $stats{'reused-connections'}) . ")\n";
+        get_percentage($stats{requests}, $stats{'reused-connections'}) .
+        "; server offers accepted: " .
+        get_percentage($stats{'server-keep-alive'}, $stats{'reused-connections'}) . ")\n";
     print "Empty responses: " . $stats{'empty-responses'} . " (" .
         get_percentage($stats{requests}, $stats{'empty-responses'}) . ")\n";
     print "Empty responses on new connections: "