From: Fabian Keil <fk@fabiankeil.de>
Date: Tue, 28 May 2013 14:38:15 +0000 (+0000)
Subject: Show the absolute number of improperly accounted requests
X-Git-Tag: v_3_0_22~251
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/developer-manual/faq/static/@default-cgi@send-stylesheet?a=commitdiff_plain;h=e2e40afe030754da83508d75ccc4a41ed5fc5780;p=privoxy.git

Show the absolute number of improperly accounted requests

While at it, add a comment describing why accounting issues aren't (necessarily) bugs.
---

diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl
index ca9df7b9..a5ec2f17 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.158 2013/01/16 16:30:00 fabiankeil Exp $
+# $Id: privoxy-log-parser.pl,v 1.159 2013/01/16 16:30:16 fabiankeil Exp $
 #
 # TODO:
 #       - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting
@@ -2188,7 +2188,8 @@ sub print_stats () {
     unless ($cli_options{'show-complete-request-distribution'}) {
         printf "Enable --show-complete-request-distribution to get less common numbers as well.\n";
     }
-    printf "Unaccounted requests: ~%d\n", $stats{requests} - $client_requests_checksum;
+    # Due to log rotation we may not have a complete picture for all the requests
+    printf "Improperly accounted requests: ~%d\n", abs($stats{requests} - $client_requests_checksum);
 
     if ($stats{method} eq 0) {
         print "No response lines parsed yet yet.\n";