mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +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'\
|
'children have taken %s seconds of user time and %s seconds'\
|
||||||
' of system time for a total of %s seconds of CPU time. ' \
|
' of system time for a total of %s seconds of CPU time. ' \
|
||||||
'I\'ve taken a total of %s%% of this computer\'s 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,
|
(user, system, user + system,
|
||||||
childUser, childSystem, childUser + childSystem,
|
childUser, childSystem, childUser + childSystem,
|
||||||
(user+system+childUser+childSystem)/timeRunning,
|
(user+system+childUser+childSystem)/timeRunning,
|
||||||
world.threadsSpawned,
|
world.threadsSpawned,
|
||||||
world.threadsSpawned == 1 and 'thread' or 'threads',
|
world.threadsSpawned == 1 and 'thread' or 'threads',
|
||||||
threads)
|
threads, world.commandsProcessed)
|
||||||
irc.reply(msg, response)
|
irc.reply(msg, response)
|
||||||
|
|
||||||
def uptime(self, irc, msg, args):
|
def uptime(self, irc, msg, args):
|
||||||
|
@ -263,6 +263,7 @@ class IrcObjectProxy:
|
|||||||
self.args = args
|
self.args = args
|
||||||
self.counter = 0
|
self.counter = 0
|
||||||
self.finalEvaled = False
|
self.finalEvaled = False
|
||||||
|
world.commandsProcessed += 1
|
||||||
self.evalArgs()
|
self.evalArgs()
|
||||||
|
|
||||||
def findCallback(self, commandName):
|
def findCallback(self, commandName):
|
||||||
|
@ -50,6 +50,7 @@ import debug
|
|||||||
startedAt = 0.0
|
startedAt = 0.0
|
||||||
|
|
||||||
threadsSpawned = 0
|
threadsSpawned = 0
|
||||||
|
commandsProcessed = 0
|
||||||
###
|
###
|
||||||
# End Global Values.
|
# End Global Values.
|
||||||
###
|
###
|
||||||
|
Loading…
Reference in New Issue
Block a user