[rhmessaging-commits] rhmessaging commits: r2135 - mgmt/cumin/python/cumin.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Jun 5 17:53:57 EDT 2008


Author: justi9
Date: 2008-06-05 17:53:57 -0400 (Thu, 05 Jun 2008)
New Revision: 2135

Modified:
   mgmt/cumin/python/cumin/model.py
   mgmt/cumin/python/cumin/queue.py
   mgmt/cumin/python/cumin/queue.strings
Log:
Add journal statistics

Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py	2008-06-05 18:28:27 UTC (rev 2134)
+++ mgmt/cumin/python/cumin/model.py	2008-06-05 21:53:57 UTC (rev 2135)
@@ -29,6 +29,8 @@
         CuminConnection(self)
         CuminSession(self)
         CuminLink(self)
+        CuminStore(self)
+        CuminJournal(self)
 
         CuminBrokerRegistration(self)
         CuminBrokerGroup(self)
@@ -998,7 +1000,89 @@
 
     def get_title(self, session):
         return "Broker Link"
+
+class CuminStore(RemoteClass):
+    def __init__(self, model):
+        super(CuminStore, self).__init__(model, "store", Store, StoreStats)
+
+        prop = CuminProperty(self, "location")
+        prop.title = "Location"
+
+class CuminJournal(RemoteClass):
+    def __init__(self, model):
+        super(CuminJournal, self).__init__(model, "journal",
+                                           Journal, JournalStats)
+
+        prop = CuminProperty(self, "name")
+        prop.title = "Name"
+        prop.summary = True
+
+        prop = CuminProperty(self, "journalDirectory")
+        prop.title = "Directory"
+
+        stat = CuminStat(self, "initialFileCount")
+        stat.title = "Initial File Count"
+
+        stat = CuminStat(self, "dataFileSize")
+        stat.title = "Data File Size"
+        stat.unit = "byte"
+        stat.category = "io.journal"
+
+        stat = CuminStat(self, "recordDepth")
+        stat.title = "Record Depth"
+        stat.unit = "record"
+        stat.category = "io.journal"
         
+        stat = CuminStat(self, "recordEnqueues")
+        stat.title = "Record Enqueues"
+        stat.unit = "record"
+        stat.category = "io.journal"
+        
+        stat = CuminStat(self, "outstandingAIOs")
+        stat.title = "Outstanding AIOs"
+        stat.unit = "aio"
+        stat.category = "io.journal"
+        
+        stat = CuminStat(self, "freeFileCount")
+        stat.title = "Free Files"
+        stat.unit = "file"
+        stat.category = "io.journal"
+        
+        stat = CuminStat(self, "availableFileCount")
+        stat.title = "Avail. Files"
+        stat.unit = "file"
+        stat.category = "io.journal"
+        
+        stat = CuminStat(self, "writeWaitFailures")
+        stat.title = "Write Wait Failures"
+        stat.unit = "failure"
+        stat.category = "io.journal"
+        
+        stat = CuminStat(self, "writeBusyFailures")
+        stat.title = "Write Busy Failures"
+        stat.unit = "failure"
+        stat.category = "io.journal"
+        
+        stat = CuminStat(self, "readRecordCount")
+        stat.title = "Read Records"
+        stat.unit = "record"
+        stat.category = "io.journal"
+        
+        stat = CuminStat(self, "readBusyFailures")
+        stat.title = "Read Busy Failures"
+        stat.unit = "failure"
+        stat.category = "io.journal"
+        
+        stat = CuminStat(self, "writePageCacheDepth")
+        stat.title = "Write Page Cache Depth"
+        stat.unit = "page"
+        stat.category = "io.journal"
+        
+        stat = CuminStat(self, "readPageCacheDepth")
+        stat.title = "Read Page Cache Depth"
+        stat.unit = "page"
+        stat.category = "io.journal"
+        
 class CuminBrokerRegistration(LocalClass):
     def __init__(self, model):
         super(CuminBrokerRegistration, self).__init__ \

Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py	2008-06-05 18:28:27 UTC (rev 2134)
+++ mgmt/cumin/python/cumin/queue.py	2008-06-05 21:53:57 UTC (rev 2135)
@@ -480,6 +480,7 @@
         super(QueueStatsDurability, self).__init__(app, name)
 
         self.add_child(StatSet(app, "io", "io.durable"))
+        self.add_child(JournalStats(app, "jrnl", "io.journal"))
 
         chart = self.EnqueueDequeueRateChart(app, "enqdeq")
         self.add_child(chart)
@@ -498,6 +499,26 @@
         def render_title(self, session, queue):
             return "Durable Messages Enqueued and Dequeued"
 
+class JournalStats(StatSet):
+    def get_args(self, session):
+        queue = self.frame.get_args(session)[0]
+
+        try:
+            jrnl = Journal.selectBy(queue=queue)[0]
+        except IndexError:
+            jrnl = None
+
+        return (jrnl,)
+
+    def render_title(self, session, jrnl):
+        return "Journal"
+
+    def do_render(self, session, jrnl):
+        if jrnl:
+            return super(JournalStats, self).do_render(session, jrnl)
+        else:
+            return "<div class=\"iblock\">%s</div>" % fmt_none()
+
 class QueueStatsTransactions(Widget):
     def __init__(self, app, name):
         super(QueueStatsTransactions, self).__init__(app, name)

Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings	2008-06-05 18:28:27 UTC (rev 2134)
+++ mgmt/cumin/python/cumin/queue.strings	2008-06-05 21:53:57 UTC (rev 2135)
@@ -203,6 +203,9 @@
     <td>
       <h2>Durable Input/Output</h2>
       {io}
+
+      <h2>Journal</h2>
+      {jrnl}
     </td>
     <td>
       {enqdeq}
@@ -210,6 +213,20 @@
   </tr>
 </table>
 
+[JournalStats.html]
+<table id="{id}" class="StatSet">
+  <thead>
+    <tr>
+      <th style="width: 50%; text-align: left;">Statistic</th>
+      <th style="width: 25%;">Value</th>
+      <th style="width: 25%;">Per Second</th>
+    </tr>
+  </thead>
+  <tbody>
+    {items}
+  </tbody>
+</table>
+
 [QueueStatsTransactions.html]
 <table class="twocol">
   <tr>




More information about the rhmessaging-commits mailing list