current/tools privoxy-log-parser.pl,1.165,1.166

Fabian Keil <[email protected]> Fri, 24 Feb 2017 12:00:09 +0000
Newsgroups gmane.comp.web.privoxy.cvs
Message-ID <[email protected]>
Update of /cvsroot/ijbswa/current/tools
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv18713/tools

Modified Files:
	privoxy-log-parser.pl 
Log Message:
privoxy-log-parser: Count connection failures as well in statistics mode

Sponsored by: Robert Klemme


Index: privoxy-log-parser.pl
===================================================================
RCS file: /cvsroot/ijbswa/current/tools/privoxy-log-parser.pl,v
retrieving revision 1.165
retrieving revision 1.166
diff -C2 -d -r1.165 -r1.166
*** privoxy-log-parser.pl	24 Feb 2017 11:59:58 -0000	1.165
--- privoxy-log-parser.pl	24 Feb 2017 12:00:07 -0000	1.166
***************
*** 2010,2013 ****
--- 2010,2017 ----
          # Connection timeout: http://c.tile.openstreetmap.org/18/136116/87842.png
          $stats{'connection-timeout'}++;
+ 
+     } elsif ($c =~ m/^Connection failure:/) {
+         # Connection failure: http://127.0.0.1:8080/
+         $stats{'connection-failure'}++;
      }
  }
***************
*** 2156,2159 ****
--- 2160,2165 ----
      print "Connection timeouts: " . $stats{'connection-timeout'} . " (" .
          get_percentage($stats{requests}, $stats{'connection-timeout'}) . ")\n";
+     print "Connection failures: " . $stats{'connection-failure'} . " (" .
+         get_percentage($stats{requests}, $stats{'connection-failure'}) . ")\n";
      print "Outgoing requests: " . $outgoing_requests . " (" .
          get_percentage($stats{requests}, $outgoing_requests) . ")\n";


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot