summaryrefslogtreecommitdiff
path: root/python/commands/qpid-queue-stats
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2009-11-10 15:21:20 +0000
committerTed Ross <tross@apache.org>2009-11-10 15:21:20 +0000
commitf3e97d22e1aa642f237f2a774bc2488ad457c741 (patch)
tree3a75777b702f3bfea97054f977764563cc5cd2e9 /python/commands/qpid-queue-stats
parent4132f2521d6ee7e08b257ea0abdffd759208c445 (diff)
downloadqpid-python-f3e97d22e1aa642f237f2a774bc2488ad457c741.tar.gz
Added calls to flush() for stdout to make this program more responsive in cases where output
buffering may occur (i.e. piping to a file and tailing the file). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@834496 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/commands/qpid-queue-stats')
-rwxr-xr-xpython/commands/qpid-queue-stats4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/commands/qpid-queue-stats b/python/commands/qpid-queue-stats
index 356a1d2d8d..3b8a0dcb19 100755
--- a/python/commands/qpid-queue-stats
+++ b/python/commands/qpid-queue-stats
@@ -79,7 +79,7 @@ class BrokerManager(Console):
if len(self.filter) > 0 :
match = False
-
+
for x in self.filter:
if x.match(name):
match = True
@@ -103,12 +103,14 @@ class BrokerManager(Console):
(deltaTime / 1000000000.0)
print "%-41s%10.2f%11d%13.2f%13.2f" % \
(name, deltaTime / 1000000000, record.msgDepth, enqueueRate, dequeueRate)
+ sys.stdout.flush()
def Display (self):
self.session.bindClass("org.apache.qpid.broker", "queue")
print "Queue Name Sec Depth Enq Rate Deq Rate"
print "========================================================================================"
+ sys.stdout.flush()
try:
while True:
sleep (1)