From: Darold Gilles Date: Wed, 7 Nov 2012 14:05:43 +0000 (+0100) Subject: Add report of the current total of queries and events parsed in progress bar. Thanks... X-Git-Tag: v3.2~106 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c4bd36fd0dfeb71af2de10694088860665f4e10;p=pgbadger Add report of the current total of queries and events parsed in progress bar. Thanks to Jehan-Guillaume de Rorthais for the patch. --- diff --git a/pgbadger b/pgbadger index 09f94c0..46c089b 100755 --- a/pgbadger +++ b/pgbadger @@ -4098,9 +4098,9 @@ sub progress_bar $char ||= '='; my $num_width = length $total; sprintf( - "[%-${width}s] Parsed %${num_width}s bytes of %s (%.2f%%)\r", + "[%-${width}s] Parsed %${num_width}s bytes of %s (%.2f%%), queries: %d, events: %d\r", $char x (($width - 1) * $got / $total) . '>', - $got, $total, 100 * $got / +$total + $got, $total, 100 * $got / +$total, $overall_stat{'queries_number'}, $overall_stat{'errors_number'} ); }