[Spambayes] Hi all..

Tony Meyer tameyer at ihug.co.nz
Thu Oct 28 01:37:14 CEST 2004


> Just wanna know, how long or how milliseconds
> does spambayes took to filter a single message? 

Got a watch?  <wink>.

Seriously, are you asking for some sort of 'average' time, or times for
specific messages?  The time will vary hugely depending on the content of
the messages, the options you have enabled, the size & type of database you
are using, the operating system you are using, the machine you are using,
and much more.

If you want to know how long individual messages take to score with your
system, you'll need to:

  1.  Run from source, not the binary.
  2.  Decide when to start timing (when SpamBayes finds out about a new
messages?  When it starts tokenizing it?  When it starts classifying it?
When it has a copy of the message?).
  3.  Add in the lines "import time" and "start_time = time.time()" to just
above that place in the code.
  4.  Decide when to stop timing (see above).
  5.  Add in the line "print time.time() - start_time" to just below that
place in the code*.
  6.  Read the log/console output for the data.

* This assumes that the two changes are in the same function.  If not, then
that needs to be worked around, too.

=Tony.Meyer

-- 
Please always include the list (spambayes at python.org) in your replies
(reply-all), and please don't send me personal mail about SpamBayes.
http://www.massey.ac.nz/~tameyer/writing/reply_all.html explains this.



More information about the Spambayes mailing list