Added tracking of how many commands have been processed.

This commit is contained in:
Jeremy Fincher 2003-08-29 07:08:03 +00:00
parent 295c5d8411
commit 89a0d12cce
3 changed files with 5 additions and 2 deletions

View File

@ -453,13 +453,14 @@ class FunCommands(callbacks.Privmsg):
'children have taken %s seconds of user time and %s seconds'\
' of system time for a total of %s seconds of CPU time. ' \
'I\'ve taken a total of %s%% of this computer\'s time. ' \
'Out of %s spawned %s, I have %s active.' %\
'Out of %s spawned %s, I have %s active. ' \
'I have processed %s commands.' %\
(user, system, user + system,
childUser, childSystem, childUser + childSystem,
(user+system+childUser+childSystem)/timeRunning,
world.threadsSpawned,
world.threadsSpawned == 1 and 'thread' or 'threads',
threads)
threads, world.commandsProcessed)
irc.reply(msg, response)
def uptime(self, irc, msg, args):

View File

@ -263,6 +263,7 @@ class IrcObjectProxy:
self.args = args
self.counter = 0
self.finalEvaled = False
world.commandsProcessed += 1
self.evalArgs()
def findCallback(self, commandName):

View File

@ -50,6 +50,7 @@ import debug
startedAt = 0.0
threadsSpawned = 0
commandsProcessed = 0
###
# End Global Values.
###