Author: justi9
Date: 2007-11-06 10:59:13 -0500 (Tue, 06 Nov 2007)
New Revision: 1242
Modified:
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/exchange.strings
Log:
Displays rates instead of totals for exchange message receives and
routes.
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-11-06 15:52:45 UTC (rev 1241)
+++ mgmt/cumin/python/cumin/exchange.py 2007-11-06 15:59:13 UTC (rev 1242)
@@ -68,18 +68,20 @@
def render_item_received(self, session, exchange):
unit = self.unit.get(session)
key = unit == "b" and "byteReceives" or
"msgReceives"
- return exchange.get_measurement(key).get_value()
+ value = exchange.get_measurement(key).get_rate()
+ return fmt_rate(value, unit == "b" and "byte" or
"msg", "sec")
+ def render_item_routed(self, session, exchange):
+ unit = self.unit.get(session)
+ key = unit == "b" and "byteRoutes" or "msgRoutes"
+ value = exchange.get_measurement(key).get_rate()
+ return fmt_rate(value, unit == "b" and "byte" or
"msg", "sec")
+
def render_item_dropped(self, session, exchange):
unit = self.unit.get(session)
key = unit == "b" and "byteDrops" or "msgDrops"
return exchange.get_measurement(key).get_value()
- def render_item_routed(self, session, exchange):
- unit = self.unit.get(session)
- key = unit == "b" and "byteRoutes" or "msgRoutes"
- return exchange.get_measurement(key).get_value()
-
def render_item_status(self, session, exchange):
return fmt_status(len(exchange.errors), len(exchange.warnings))
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-11-06 15:52:45 UTC (rev 1241)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-11-06 15:59:13 UTC (rev 1242)
@@ -20,8 +20,8 @@
<th class="ralign">Producers</th>
<th class="ralign">Queue Bindings</th>
<th class="ralign">{unit_plural} Received</th>
+ <th class="ralign">{unit_plural} Routed</th>
<th class="ralign">{unit_plural} Dropped</th>
- <th class="ralign">{unit_plural} Routed</th>
<th>Status</th>
</tr>
@@ -34,8 +34,8 @@
<td class="ralign">{item_producers}</td>
<td class="ralign">{item_bindings}</td>
<td class="ralign">{item_received}</td>
+ <td class="ralign">{item_routed}</td>
<td class="ralign">{item_dropped}</td>
- <td class="ralign">{item_routed}</td>
<td>{item_status}</td>
</tr>
Show replies by date