You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2004/08/04 06:10:56 UTC

svn commit: rev 35664 - spamassassin/branches/b2_6_0/masses

Author: felicity
Date: Tue Aug  3 21:10:54 2004
New Revision: 35664

Modified:
   spamassassin/branches/b2_6_0/masses/mass-check
Log:
trivial patch from 3.0, shows amount of time to process per message

Modified: spamassassin/branches/b2_6_0/masses/mass-check
==============================================================================
--- spamassassin/branches/b2_6_0/masses/mass-check	(original)
+++ spamassassin/branches/b2_6_0/masses/mass-check	Tue Aug  3 21:10:54 2004
@@ -214,7 +214,7 @@
 
 sub wanted {
   my ($id, $time, $dataref) = @_;
-  my $out;
+  my ($out, $after, $begin);
 
   my $ma = Mail::SpamAssassin::NoMailAudit->new('data' => $dataref);
   $ma->{noexit} = 1;
@@ -228,7 +228,9 @@
     $ma = Mail::SpamAssassin::NoMailAudit->new ('data' => $dataref);
   }
 
+  $before = time;
   my $status = $spamtest->check($ma);
+  $after = time;
 
   my @extra;
   if (defined($time)) {
@@ -252,6 +254,7 @@
     $mid =~ tr/-A-Za-z0-9_!#%&=~<@>/./c;     # replace dangerous chars with . (so regexp search just works)
     push(@extra, "mid=$mid");
   }
+  push(@extra, "scantime=" . ($after - $before));
 
   my $yorn = $status->is_spam() ? 'Y' : '.';
   my $hits = $status->get_hits();