You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2009/08/14 22:21:20 UTC
svn commit: r804360 - /spamassassin/trunk/masses/logs-to-corpus-report
Author: jm
Date: Fri Aug 14 20:21:20 2009
New Revision: 804360
URL: http://svn.apache.org/viewvc?rev=804360&view=rev
Log:
add an OVERALL TOTAL bottom line to the corpus report
Modified:
spamassassin/trunk/masses/logs-to-corpus-report
Modified: spamassassin/trunk/masses/logs-to-corpus-report
URL: http://svn.apache.org/viewvc/spamassassin/trunk/masses/logs-to-corpus-report?rev=804360&r1=804359&r2=804360&view=diff
==============================================================================
--- spamassassin/trunk/masses/logs-to-corpus-report (original)
+++ spamassassin/trunk/masses/logs-to-corpus-report Fri Aug 14 20:21:20 2009
@@ -48,9 +48,14 @@
$byuser->{$who}->{buckets} = $buckets;
}
+my $all_tspam = 0;
+my $all_tham = 0;
+
foreach my $who (sort keys %{$byuser}) {
report($byuser->{$who}->{buckets}, $total_counts, $who);
}
+
+final_report($total_counts);
exit;
# ---------------------------------------------------------------------------
@@ -137,11 +142,24 @@
$tham, as_percent($tham, $total_counts->{ham}),
format_score_range($trhlo, $trhhi);
+ $all_tspam += $tspam;
+ $all_tham += $tham;
print "\n";
}
# ---------------------------------------------------------------------------
+sub final_report {
+ my ($total_counts) = @_;
+
+ printf "%-16s %7s %6s %-14s %7s %6s %-14s\n",
+ "OVERALL TOTAL:",
+ $all_tspam, '', '',
+ $all_tham, '', '';
+}
+
+# ---------------------------------------------------------------------------
+
use Time::Local;
sub create_date_lookup_table {