From 89a0d12ccef52b2d0ef6a3c780d082b4aaa67f94 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 29 Aug 2003 07:08:03 +0000 Subject: [PATCH] Added tracking of how many commands have been processed. --- plugins/FunCommands.py | 5 +++-- src/callbacks.py | 1 + src/world.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/FunCommands.py b/plugins/FunCommands.py index 4afac7531..0386548f0 100644 --- a/plugins/FunCommands.py +++ b/plugins/FunCommands.py @@ -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): diff --git a/src/callbacks.py b/src/callbacks.py index ea2fc66b8..764980f09 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -263,6 +263,7 @@ class IrcObjectProxy: self.args = args self.counter = 0 self.finalEvaled = False + world.commandsProcessed += 1 self.evalArgs() def findCallback(self, commandName): diff --git a/src/world.py b/src/world.py index 3e9aa0d55..0847cb1ff 100644 --- a/src/world.py +++ b/src/world.py @@ -50,6 +50,7 @@ import debug startedAt = 0.0 threadsSpawned = 0 +commandsProcessed = 0 ### # End Global Values. ###