Added IrcMsg parsing time logging.

This commit is contained in:
Jeremy Fincher 2003-04-15 14:36:58 +00:00
parent 78687027b0
commit 5ef41fa445

View File

@ -107,18 +107,14 @@ class AsyncoreDriver(asynchat.async_chat, object):
def found_terminator(self): def found_terminator(self):
#debug.methodNamePrintf(self, 'found_terminator') #debug.methodNamePrintf(self, 'found_terminator')
start = time.time()
msg = ircmsgs.IrcMsg(self.buffer) msg = ircmsgs.IrcMsg(self.buffer)
debug.msg('Time to parse IrcMsg: %s' % (time.time()-start), 'verbose')
self.buffer = ''
try: try:
self.irc.feedMsg(msg) self.irc.feedMsg(msg)
except Exception, e: except:
debug.recoverableException() debug.recoverableException()
if ircutils.isChannel(msg.args[0]):
recipient = msg.args[0]
else:
recipient = msg.nick
self.irc.queueMsg(ircmsgs.privmsg(recipient,
'Uncaught Irc object exception: %s' % debug.exnToString(e)))
self.buffer = ''
def handle_close(self): def handle_close(self):
#debug.methodNamePrintf(self, 'handle_close') #debug.methodNamePrintf(self, 'handle_close')