From: Alexander Moisseev Date: Thu, 8 Dec 2016 14:59:37 +0000 (+0300) Subject: [Minor] rspamd_stats: add actions percentage to summary X-Git-Tag: 1.5.0~645^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d7b51b19d827064ffd20ae5e235b161261e7f52;p=thirdparty%2Frspamd.git [Minor] rspamd_stats: add actions percentage to summary --- diff --git a/utils/rspamd_stats.pl b/utils/rspamd_stats.pl index b845964ff9..aa0a2c45ff 100644 --- a/utils/rspamd_stats.pl +++ b/utils/rspamd_stats.pl @@ -173,7 +173,8 @@ printf " [ %s / %s ] ", $timeStamp{'start'}, $timeStamp{'end'} if defined $timeStamp{'start'}; say ''; -printf "%11s: %d\n", $_, $action{$_} for sort keys %action; +printf "%11s: %6.2f%%, %d\n", $_, 100 * $action{$_} / $total, $action{$_} + for sort keys %action; say ''; printf "scan time min/avg/max = %.2f/%.2f/%.2f s ", $scanTime{'min'} / 1000,