[rhmessaging-commits] rhmessaging commits: r2856 - mgmt/trunk/mint/python/mint.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Nov 20 17:21:56 EST 2008


Author: nunofsantos
Date: 2008-11-20 17:21:56 -0500 (Thu, 20 Nov 2008)
New Revision: 2856

Modified:
   mgmt/trunk/mint/python/mint/__init__.py
   mgmt/trunk/mint/python/mint/schema.py
   mgmt/trunk/mint/python/mint/tools.py
Log:
use sys.setcheckinterval for better thread switching performance; have mint-bench prints queue depth

Modified: mgmt/trunk/mint/python/mint/__init__.py
===================================================================
--- mgmt/trunk/mint/python/mint/__init__.py	2008-11-20 21:39:28 UTC (rev 2855)
+++ mgmt/trunk/mint/python/mint/__init__.py	2008-11-20 22:21:56 UTC (rev 2856)
@@ -2,6 +2,7 @@
 import qmf.console
 import pickle
 import struct
+import sys
 import types
 from threading import Lock, RLock
 from sqlobject import *
@@ -24,6 +25,10 @@
   except TypeError:
     pass
 
+# get better thread switching performance
+sys.setcheckinterval(50)
+
+
 Broker.sqlmeta.addColumn(ForeignKey("BrokerRegistration",
                                     cascade="null", default=None,
                                     name="registration"))

Modified: mgmt/trunk/mint/python/mint/schema.py
===================================================================
--- mgmt/trunk/mint/python/mint/schema.py	2008-11-20 21:39:28 UTC (rev 2855)
+++ mgmt/trunk/mint/python/mint/schema.py	2008-11-20 22:21:56 UTC (rev 2856)
@@ -1,7 +1,7 @@
 import mint
 from sqlobject import *
 from datetime import datetime
-from qpid.qmfconsole import ObjectId
+from qmf.console import ObjectId
 
 class Pool(SQLObject):
   class sqlmeta:

Modified: mgmt/trunk/mint/python/mint/tools.py
===================================================================
--- mgmt/trunk/mint/python/mint/tools.py	2008-11-20 21:39:28 UTC (rev 2855)
+++ mgmt/trunk/mint/python/mint/tools.py	2008-11-20 22:21:56 UTC (rev 2856)
@@ -83,7 +83,7 @@
             enq_last = 0
             deq_last = 0
 
-            print "enqs", "\t", "deqs"
+            print "enqs", "\t", "deqs", "\t", "depth"
 
             while True:
                 sleep(1)
@@ -94,7 +94,7 @@
                 enq_rate = enq - enq_last
                 deq_rate = deq - deq_last
 
-                print enq_rate, "\t", deq_rate
+                print enq_rate, "\t", deq_rate, "\t", enq - deq
 
                 enq_last = enq
                 deq_last = deq




More information about the rhmessaging-commits mailing list