Added logging of regexp cache size.

This commit is contained in:
Jeremy Fincher 2003-11-02 19:00:15 +00:00
parent d816bc6a68
commit 077fcd8d7e
1 changed files with 3 additions and 1 deletions

View File

@ -35,8 +35,9 @@ Module for general worldly stuff, like global variables and whatnot.
import fix
import os
import gc
import os
import sre
import time
import types
import atexit
@ -90,6 +91,7 @@ def upkeep(): # Function to be run on occasion to do upkeep stuff.
debug.msg('Uncollectable garbage: %s' % gc.garbage, 'normal')
if 'noflush' not in tempvars:
flush()
debug.msg('Regexp cache size: %s' % len(sre._cache), 'verbose')
msg = '%s upkeep ran.' % time.strftime(conf.logTimestampFormat)
debug.msg(msg, 'verbose')
return collected