[rhmessaging-commits] rhmessaging commits: r1251 - in mgmt: notes and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Nov 6 13:38:06 EST 2007


Author: justi9
Date: 2007-11-06 13:38:06 -0500 (Tue, 06 Nov 2007)
New Revision: 1251

Modified:
   mgmt/cumin/python/cumin/exchange.py
   mgmt/cumin/python/cumin/exchange.strings
   mgmt/cumin/python/cumin/queue.py
   mgmt/cumin/python/cumin/queue.strings
   mgmt/notes/justin-todo.txt
Log:
Adds rates to the lists of consumers, producers, and bindings.



Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py	2007-11-06 18:23:41 UTC (rev 1250)
+++ mgmt/cumin/python/cumin/exchange.py	2007-11-06 18:38:06 UTC (rev 1251)
@@ -185,6 +185,10 @@
     def render_item_messages_matched(self, session, binding):
         return binding.get_measurement("msgMatched").get_value()
 
+    def render_item_messages_matched_rate(self, session, binding):
+        value = binding.get_measurement("msgMatched").get_rate()
+        return fmt_rate(value, "msg", "sec")
+
 class ExchangeForm(CuminForm):
     def __init__(self, app, name):
         super(ExchangeForm, self).__init__(app, name)
@@ -352,9 +356,17 @@
     def render_item_messages_produced(self, session, producer):
         return producer.get_measurement("msgsProduced").get_value()
 
+    def render_item_messages_produced_rate(self, session, producer):
+        value = producer.get_measurement("msgsProduced").get_rate()
+        return fmt_rate(value, "msg", "sec")
+
     def render_item_bytes_produced(self, session, producer):
         return producer.get_measurement("bytesProduced").get_value()
 
+    def render_item_bytes_produced_rate(self, session, producer):
+        value = producer.get_measurement("bytesProduced").get_rate()
+        return fmt_rate(value, "byte", "sec")
+
 class ExchangeChartPage(CuminChartPage):
     def __init__(self, app, name):
         super(ExchangeChartPage, self).__init__(app, name)

Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings	2007-11-06 18:23:41 UTC (rev 1250)
+++ mgmt/cumin/python/cumin/exchange.strings	2007-11-06 18:38:06 UTC (rev 1251)
@@ -102,7 +102,7 @@
   <tr>
     <th>Queue</th>
     <th>Key</th>
-    <th class="ralign">Messages Matched</th>
+    <th class="ralign" colspan="2">Messages Matched</th>
   </tr>
 
   {items}
@@ -112,6 +112,7 @@
 <tr>
   <td><a href="{item_href}">Queue '{item_name}'</a></td>
   <td>{item_binding_key}</td>
+  <td class="ralign">{item_messages_matched_rate}</td>
   <td class="ralign">{item_messages_matched}</td>
 </tr>
 
@@ -159,8 +160,8 @@
   <tr>
     <th><input type="checkbox"/></th>
     <th>Name</th>
-    <th class="ralign">Msgs. Produced</th>
-    <th class="ralign">Bytes Produced</th>
+    <th class="ralign" colspan="2">Msgs. Produced</th>
+    <th class="ralign" colspan="2">Bytes Produced</th>
   </tr>
 
   {items}
@@ -170,6 +171,8 @@
 <tr>
   <td><input type="checkbox"/></td>
   <td>{item_name}</td>
+  <td class="ralign">{item_messages_produced_rate}</td>
   <td class="ralign">{item_messages_produced}</td>
+  <td class="ralign">{item_bytes_produced_rate}</td>
   <td class="ralign">{item_bytes_produced}</td>
 </tr>

Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py	2007-11-06 18:23:41 UTC (rev 1250)
+++ mgmt/cumin/python/cumin/queue.py	2007-11-06 18:38:06 UTC (rev 1251)
@@ -207,6 +207,10 @@
     def render_item_messages_matched(self, session, binding):
         return binding.get_measurement("msgMatched").get_value()
 
+    def render_item_messages_matched_rate(self, session, binding):
+        value = binding.get_measurement("msgMatched").get_rate()
+        return fmt_rate(value, "msg", "sec")
+
 class QueueForm(CuminForm):
     def __init__(self, app, name):
         super(QueueForm, self).__init__(app, name)
@@ -457,9 +461,17 @@
     def render_item_messages_consumed(self, session, consumer):
         return consumer.get_measurement("msgsConsumed").get_value()
 
+    def render_item_messages_consumed_rate(self, session, consumer):
+        value = consumer.get_measurement("msgsConsumed").get_rate()
+        return fmt_rate(value, "msg", "sec")
+
     def render_item_bytes_consumed(self, session, consumer):
         return consumer.get_measurement("bytesConsumed").get_value()
 
+    def render_item_bytes_consumed_rate(self, session, consumer):
+        value = consumer.get_measurement("bytesConsumed").get_rate()
+        return fmt_rate(value, "byte", "sec")
+
     def render_item_unacked_messages(self, session, consumer):
         return consumer.get_measurement("unackedMessages").get_value()
 

Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings	2007-11-06 18:23:41 UTC (rev 1250)
+++ mgmt/cumin/python/cumin/queue.strings	2007-11-06 18:38:06 UTC (rev 1251)
@@ -177,7 +177,7 @@
   <tr>
     <th>Exchange</th>
     <th>Key</th>
-    <th class="ralign">Messages Matched</th>
+    <th class="ralign" colspan="2">Messages Matched</th>
   </tr>
 
   {items}
@@ -187,6 +187,7 @@
 <tr>
   <td><a href="{item_href}">Exchange '{item_name}'</a></td>
   <td>{item_binding_key}</td>
+  <td class="ralign">{item_messages_matched_rate}</td>
   <td class="ralign">{item_messages_matched}</td>
 </tr>
 
@@ -271,8 +272,8 @@
   <tr>
     <th><input type="checkbox"/></th>
     <th>Name</th>
-    <th class="ralign">Msgs. Consumed</th>
-    <th class="ralign">Bytes Consumed</th>
+    <th class="ralign" colspan="2">Msgs. Consumed</th>
+    <th class="ralign" colspan="2">Bytes Consumed</th>
     <th class="ralign">Msgs. Unacked</th>
   </tr>
 
@@ -283,7 +284,9 @@
 <tr>
   <td><input type="checkbox"/></td>
   <td>{item_name}</td>
+  <td class="ralign">{item_messages_consumed_rate}</td>
   <td class="ralign">{item_messages_consumed}</td>
+  <td class="ralign">{item_bytes_consumed_rate}</td>
   <td class="ralign">{item_bytes_consumed}</td>
   <td class="ralign">{item_unacked_messages}</td>
 </tr>

Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt	2007-11-06 18:23:41 UTC (rev 1250)
+++ mgmt/notes/justin-todo.txt	2007-11-06 18:38:06 UTC (rev 1251)
@@ -17,8 +17,6 @@
 
  * Add charts for clients
 
- * Consumers and Producers tabs are missing rates, as are bindings
-
 Deferred
 
  * Make the status lights also be links to an appropriate view




More information about the rhmessaging-commits mailing list