From f3e97d22e1aa642f237f2a774bc2488ad457c741 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Tue, 10 Nov 2009 15:21:20 +0000 Subject: 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 --- python/commands/qpid-queue-stats | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python/commands') 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) -- cgit v1.2.1