mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Added tracking of how many commands have been processed.
This commit is contained in:
parent
295c5d8411
commit
89a0d12cce
@ -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):
|
||||
|
@ -263,6 +263,7 @@ class IrcObjectProxy:
|
||||
self.args = args
|
||||
self.counter = 0
|
||||
self.finalEvaled = False
|
||||
world.commandsProcessed += 1
|
||||
self.evalArgs()
|
||||
|
||||
def findCallback(self, commandName):
|
||||
|
@ -50,6 +50,7 @@ import debug
|
||||
startedAt = 0.0
|
||||
|
||||
threadsSpawned = 0
|
||||
commandsProcessed = 0
|
||||
###
|
||||
# End Global Values.
|
||||
###
|
||||
|
Loading…
Reference in New Issue
Block a user