Author: tross
Date: Tue Nov 10 15:21:20 2009
New Revision: 834496
URL: http://svn.apache.org/viewvc?rev=834496&view=rev
Log:
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).
Modified:
qpid/trunk/qpid/python/commands/qpid-queue-stats
Modified: qpid/trunk/qpid/python/commands/qpid-queue-stats
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/commands/qpid-queue-stats?rev=834496&r1=834495&r2=834496&view=diff
==============================================================================
--- qpid/trunk/qpid/python/commands/qpid-queue-stats (original)
+++ qpid/trunk/qpid/python/commands/qpid-queue-stats Tue Nov 10 15:21:20 2009
@@ -79,7 +79,7 @@
if len(self.filter) > 0 :
match = False
-
+
for x in self.filter:
if x.match(name):
match = True
@@ -103,12 +103,14 @@
(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)
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]