privoxy-log-parser.pl: Warn if the request counts differ
authorFabian Keil <fk@fabiankeil.de>
Sat, 30 May 2020 05:55:44 +0000 (07:55 +0200)
committerFabian Keil <fk@fabiankeil.de>
Mon, 1 Jun 2020 08:11:46 +0000 (10:11 +0200)
tools/privoxy-log-parser.pl

index 5307a49..9af2108 100755 (executable)
@@ -2169,6 +2169,10 @@ sub print_stats() {
     my $outgoing_requests = $stats{requests} - $stats{crunches};
     my $client_requests_checksum = 0;
 
+    if ($stats{requests_clf} && $stats{requests}
+        && $stats{requests_clf} != $stats{requests}) {
+        print "Inconsistent request counts: " . $stats{requests} . "/" . $stats{requests_clf} . "\n";
+    }
     if ($stats{requests_clf} && $stats{requests} eq 0) {
         $stats{requests} = $stats{requests_clf};
     }