rhmessaging commits: r1138 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-22 16:25:38 -0400 (Mon, 22 Oct 2007)
New Revision: 1138
Modified:
mgmt/cumin/python/cumin/demo.py
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/exchange.strings
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/queue.strings
Log:
Adds some instrum props that were missing from exchange and queue.
Modified: mgmt/cumin/python/cumin/demo.py
===================================================================
--- mgmt/cumin/python/cumin/demo.py 2007-10-22 18:37:35 UTC (rev 1137)
+++ mgmt/cumin/python/cumin/demo.py 2007-10-22 20:25:38 UTC (rev 1138)
@@ -154,24 +154,43 @@
self.model = model
self.setDaemon(True)
-
+
+ def frob_measure(self, measure):
+ if measure.type == "int" and random() < 0.33:
+ if random() < 0.5:
+ value = measure.get_value()
+ measure.add_value(value + randint(4, 12))
+ else:
+ value = measure.get_value() - randint(3, 9)
+ measure.add_value(value > 0 and value or 0)
+
def run(self):
while True:
sleep(1)
for server in self.model.get_servers():
for vhost in server.virtual_host_items():
+ for exchange in vhost.exchange_items():
+ exchange.lock()
+ try:
+ for measure in exchange.measurements:
+ self.frob_measure(measure)
+ finally:
+ exchange.unlock()
+
+ for binding in exchange.binding_items():
+ binding.lock()
+ try:
+ for measure in binding.measurements:
+ self.frob_measure(measure)
+ finally:
+ binding.unlock()
+
for queue in vhost.queue_items():
queue.lock()
try:
for measure in queue.measurements:
- if measure.type == "int" and random() < 0.33:
- if random() < 0.5:
- value = measure.get_value()
- measure.add_value(value + randint(4, 12))
- else:
- value = measure.get_value() - randint(3, 9)
- measure.add_value(value > 0 and value or 0)
+ self.frob_measure(measure)
queue.message_count += 1
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-10-22 18:37:35 UTC (rev 1137)
+++ mgmt/cumin/python/cumin/exchange.py 2007-10-22 20:25:38 UTC (rev 1138)
@@ -112,6 +112,9 @@
def render_item_routing_key(self, session, binding):
return binding.routing_key
+ def render_item_messages_matched(self, session, binding):
+ return binding.get_measurement("msgMatched").get_value()
+
class ExchangeForm(CuminForm):
def __init__(self, app, name):
super(ExchangeForm, self).__init__(app, name)
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-10-22 18:37:35 UTC (rev 1137)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-10-22 20:25:38 UTC (rev 1138)
@@ -96,6 +96,7 @@
<tr>
<th>Queue</th>
<th>Routing Key</th>
+ <th style="text-align: right;">Messages Matched</th>
</tr>
{items}
@@ -105,6 +106,7 @@
<tr>
<td><a href="{item_href}">Queue '{item_name}'</a></td>
<td>{item_routing_key}</td>
+ <td style="text-align: right;">{item_messages_matched}</td>
</tr>
[ExchangeStatistics.html]
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-22 18:37:35 UTC (rev 1137)
+++ mgmt/cumin/python/cumin/model.py 2007-10-22 20:25:38 UTC (rev 1138)
@@ -368,6 +368,11 @@
measure.highlow = True
self.measurements.append(measure)
+ measure = Measurement("unackedMessages", "int")
+ measure.title = "Unacknowledged messages"
+ measure.categories = ("general")
+ self.measurements.append(measure)
+
# Disk
#measure = Measurement("diskPageSize", "int")
@@ -471,6 +476,11 @@
measure.categories = ("byte", "persistent")
self.measurements.append(measure)
+ def get_measurement(self, name):
+ for measure in self.measurements:
+ if measure.name == name:
+ return measure
+
def remove(self):
for binding in self.binding_items().copy():
binding.remove()
@@ -516,36 +526,41 @@
measure.highlow = True
self.measurements.append(measure)
- measure = Measurement("bindings", "int")
+ measure = Measurement("msgReceives", "int")
measure.title = "Messages received"
measure.categories = ("message", "general")
self.measurements.append(measure)
- measure = Measurement("bindings", "int")
+ measure = Measurement("msgDrops", "int")
measure.title = "Messages dropped"
measure.categories = ("message", "general")
self.measurements.append(measure)
- measure = Measurement("bindings", "int")
- measure.title = "Messages enqueued"
+ measure = Measurement("msgRoutes", "int")
+ measure.title = "Messages routed"
measure.categories = ("message", "general")
self.measurements.append(measure)
- measure = Measurement("bindings", "int")
+ measure = Measurement("byteReceives", "int")
measure.title = "Bytes received"
measure.categories = ("byte", "general")
self.measurements.append(measure)
- measure = Measurement("bindings", "int")
+ measure = Measurement("byteDrops", "int")
measure.title = "Bytes dropped"
measure.categories = ("byte", "general")
self.measurements.append(measure)
- measure = Measurement("bindings", "int")
- measure.title = "Bytes enqueued"
+ measure = Measurement("byteRoutes", "int")
+ measure.title = "Bytes routed"
measure.categories = ("byte", "general")
self.measurements.append(measure)
+ def get_measurement(self, name):
+ for measure in self.measurements:
+ if measure.name == name:
+ return measure
+
def remove(self):
for binding in self.binding_items().copy():
binding.remove()
@@ -572,6 +587,18 @@
self.routing_key = None
+ self.measurements = list()
+
+ measure = Measurement("msgMatched", "int")
+ measure.title = "Messages matched"
+ measure.categories = ("message", "general")
+ self.measurements.append(measure)
+
+ def get_measurement(self, name):
+ for measure in self.measurements:
+ if measure.name == name:
+ return measure
+
def write_xml(self, writer):
writer.write("<binding id=\"binding-%i\">" % self.id)
writer.write("<exchange ref=\"exchange-%i\"/>" % self.exchange.id)
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-22 18:37:35 UTC (rev 1137)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-22 20:25:38 UTC (rev 1138)
@@ -135,16 +135,15 @@
self.page().show_exchange(branch, binding.get_exchange())
return branch.marshal()
- def render_item_remove_href(self, session, binding):
- branch = session.branch()
- return branch.marshal()
-
def render_item_name(self, session, binding):
return binding.get_exchange().name
def render_item_routing_key(self, session, binding):
return binding.routing_key
+ def render_item_messages_matched(self, session, binding):
+ return binding.get_measurement("msgMatched").get_value()
+
class QueueForm(CuminForm):
def __init__(self, app, name):
super(QueueForm, self).__init__(app, name)
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-22 18:37:35 UTC (rev 1137)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-22 20:25:38 UTC (rev 1138)
@@ -122,6 +122,7 @@
<tr>
<th>Exchange</th>
<th>Routing Key</th>
+ <th style="text-align: right;">Messages Matched</th>
</tr>
{items}
@@ -131,6 +132,7 @@
<tr>
<td><a href="{item_href}">Exchange '{item_name}'</a></td>
<td>{item_routing_key}</td>
+ <td style="text-align: right;">{item_messages_matched}</td>
</tr>
[QueueBindingAdd.html]
17 years, 2 months
rhmessaging commits: r1137 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-22 14:37:35 -0400 (Mon, 22 Oct 2007)
New Revision: 1137
Modified:
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/exchange.strings
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/page.strings
mgmt/cumin/python/cumin/queue.strings
Log:
Adds statistics to the exchange view.
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-10-22 15:49:12 UTC (rev 1136)
+++ mgmt/cumin/python/cumin/exchange.py 2007-10-22 18:37:35 UTC (rev 1137)
@@ -3,6 +3,7 @@
from wooly.forms import *
from wooly.resources import *
+from measurement import *
from model import *
from widgets import *
from parameters import *
@@ -75,6 +76,7 @@
self.add_child(self.tabs)
self.tabs.add_tab(ExchangeBindingSet(app, "bindings"))
+ self.tabs.add_tab(ExchangeStatistics(app, "stats"))
def render_title(self, session, exchange):
return "Exchange '%s'" % exchange.name
@@ -230,3 +232,26 @@
def render_cancel_content(self, session, exchange):
return "No, Cancel"
+
+class ExchangeStatistics(TabSet):
+ def __init__(self, app, name):
+ super(ExchangeStatistics, self).__init__(app, name)
+
+ self.add_tab(self.StatisticsCurrent(app, "current"))
+ self.add_tab(self.StatisticsHistory(app, "history"))
+
+ def render_title(self, session, exchange):
+ return "Statistics"
+
+ class StatisticsCurrent(Widget):
+ def __init__(self, app, name):
+ super(ExchangeStatistics.StatisticsCurrent, self).__init__(app, name)
+
+ self.add_child(MeasurementSet(app, "general_stats", "general"))
+
+ def render_title(self, session, exchange):
+ return "Current"
+
+ class StatisticsHistory(Widget):
+ def render_title(self, session, exchange):
+ return "History"
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-10-22 15:49:12 UTC (rev 1136)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-10-22 18:37:35 UTC (rev 1137)
@@ -106,3 +106,19 @@
<td><a href="{item_href}">Queue '{item_name}'</a></td>
<td>{item_routing_key}</td>
</tr>
+
+[ExchangeStatistics.html]
+<ul class="radiotabs tabs">{tabs}</ul>
+<div class="radiotabs mode">{mode}</div>
+
+[StatisticsCurrent.html]
+<table class="layout">
+ <tr>
+ <td class="twocol">
+ <h2>General</h2>
+ {general_stats}
+ </td>
+ <td class="twocol">
+ </td>
+ </tr>
+</table>
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-22 15:49:12 UTC (rev 1136)
+++ mgmt/cumin/python/cumin/model.py 2007-10-22 18:37:35 UTC (rev 1137)
@@ -508,6 +508,44 @@
self.is_auto_delete = False
self.is_internal = False
+ self.measurements = list()
+
+ measure = Measurement("bindings", "int")
+ measure.title = "Bindings"
+ measure.categories = ("general")
+ measure.highlow = True
+ self.measurements.append(measure)
+
+ measure = Measurement("bindings", "int")
+ measure.title = "Messages received"
+ measure.categories = ("message", "general")
+ self.measurements.append(measure)
+
+ measure = Measurement("bindings", "int")
+ measure.title = "Messages dropped"
+ measure.categories = ("message", "general")
+ self.measurements.append(measure)
+
+ measure = Measurement("bindings", "int")
+ measure.title = "Messages enqueued"
+ measure.categories = ("message", "general")
+ self.measurements.append(measure)
+
+ measure = Measurement("bindings", "int")
+ measure.title = "Bytes received"
+ measure.categories = ("byte", "general")
+ self.measurements.append(measure)
+
+ measure = Measurement("bindings", "int")
+ measure.title = "Bytes dropped"
+ measure.categories = ("byte", "general")
+ self.measurements.append(measure)
+
+ measure = Measurement("bindings", "int")
+ measure.title = "Bytes enqueued"
+ measure.categories = ("byte", "general")
+ self.measurements.append(measure)
+
def remove(self):
for binding in self.binding_items().copy():
binding.remove()
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2007-10-22 15:49:12 UTC (rev 1136)
+++ mgmt/cumin/python/cumin/page.strings 2007-10-22 18:37:35 UTC (rev 1137)
@@ -409,6 +409,10 @@
margin: 1em;
}
+table.layout {
+ width: 100%;
+}
+
[CuminPage.html]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-22 15:49:12 UTC (rev 1136)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-22 18:37:35 UTC (rev 1137)
@@ -167,13 +167,8 @@
<ul class="radiotabs tabs">{tabs}</ul>
<div class="radiotabs mode">{mode}</div>
-[StatisticsCurrent.css]
-table.StatisticsCurrent {
- width: 100%;
-}
-
[StatisticsCurrent.html]
-<table class="StatisticsCurrent">
+<table class="layout">
<tr>
<td class="twocol">
<h2>General</h2>
17 years, 2 months
rhmessaging commits: r1136 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-22 11:49:12 -0400 (Mon, 22 Oct 2007)
New Revision: 1136
Added:
mgmt/cumin/python/cumin/measurement.py
mgmt/cumin/python/cumin/measurement.strings
Modified:
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/queue.strings
Log:
Moves the measurement widgets to their own file so we can use them for
exchange stats.
Added: mgmt/cumin/python/cumin/measurement.py
===================================================================
--- mgmt/cumin/python/cumin/measurement.py (rev 0)
+++ mgmt/cumin/python/cumin/measurement.py 2007-10-22 15:49:12 UTC (rev 1136)
@@ -0,0 +1,38 @@
+from wooly import *
+from wooly.widgets import *
+
+from widgets import *
+from parameters import *
+from util import *
+
+strings = StringCatalog(__file__)
+
+class MeasurementSet(ItemSet):
+ def __init__(self, app, name, category):
+ super(MeasurementSet, self).__init__(app, name)
+
+ self.category = category
+
+ def get_items(self, session, queue):
+ measures = list(queue.measurements)
+
+ for measure in queue.measurements:
+ if self.category not in measure.categories:
+ measures.remove(measure)
+
+ return measures
+
+ def render_item_title(self, session, measure):
+ return measure.title
+
+ def render_item_value(self, session, measure):
+ return measure.get_value()
+
+ def render_item_high(self, session, measure):
+ return measure.get_high()
+
+ def render_item_low(self, session, measure):
+ return measure.get_low()
+
+ def render_item_average(self, session, measure):
+ return "%0.2f" % (sum(measure.values) / float(len(measure.values)))
Added: mgmt/cumin/python/cumin/measurement.strings
===================================================================
--- mgmt/cumin/python/cumin/measurement.strings (rev 0)
+++ mgmt/cumin/python/cumin/measurement.strings 2007-10-22 15:49:12 UTC (rev 1136)
@@ -0,0 +1,33 @@
+[MeasurementSet.css]
+table.MeasurementSet td, table.MeasurementSet th {
+ text-align: right;
+}
+
+table.MeasurementSet th.label {
+ text-align: left;
+}
+
+[MeasurementSet.html]
+<table class="MeasurementSet mobjects">
+ <col class="name"/>
+ <col class="data"/>
+ <col class="data"/>
+ <col class="data"/>
+
+ <tr>
+ <th class="label">Statistic</th>
+ <th>Current</th>
+ <th>High</th>
+ <th>Low</th>
+ </tr>
+
+ {items}
+</table>
+
+[MeasurementSet.item_html]
+<tr>
+ <th class="label">{item_title}</th>
+ <td>{item_value}</td>
+ <td>{item_high}</td>
+ <td>{item_low}</td>
+</tr>
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-22 15:24:17 UTC (rev 1135)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-22 15:49:12 UTC (rev 1136)
@@ -4,6 +4,7 @@
from wooly.resources import *
from exchange import ExchangeInputSet
+from measurement import *
from widgets import *
from parameters import *
from util import *
@@ -340,36 +341,6 @@
def render_cancel_content(self, session, binding):
return "No, Cancel"
-class MeasurementSet(ItemSet):
- def __init__(self, app, name, category):
- super(MeasurementSet, self).__init__(app, name)
-
- self.category = category
-
- def get_items(self, session, queue):
- measures = list(queue.measurements)
-
- for measure in queue.measurements:
- if self.category not in measure.categories:
- measures.remove(measure)
-
- return measures
-
- def render_item_title(self, session, measure):
- return measure.title
-
- def render_item_value(self, session, measure):
- return measure.get_value()
-
- def render_item_high(self, session, measure):
- return measure.get_high()
-
- def render_item_low(self, session, measure):
- return measure.get_low()
-
- def render_item_average(self, session, measure):
- return "%0.2f" % (sum(measure.values) / float(len(measure.values)))
-
class QueueStatistics(TabSet):
def __init__(self, app, name):
super(QueueStatistics, self).__init__(app, name)
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-22 15:24:17 UTC (rev 1135)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-22 15:49:12 UTC (rev 1136)
@@ -191,37 +191,3 @@
</td>
</tr>
</table>
-
-[MeasurementSet.css]
-table.MeasurementSet td, table.MeasurementSet th {
- text-align: right;
-}
-
-table.MeasurementSet th.label {
- text-align: left;
-}
-
-[MeasurementSet.html]
-<table class="MeasurementSet mobjects">
- <col class="name"/>
- <col class="data"/>
- <col class="data"/>
- <col class="data"/>
-
- <tr>
- <th class="label">Statistic</th>
- <th>Current</th>
- <th>High</th>
- <th>Low</th>
- </tr>
-
- {items}
-</table>
-
-[MeasurementSet.item_html]
-<tr>
- <th class="label">{item_title}</th>
- <td>{item_value}</td>
- <td>{item_high}</td>
- <td>{item_low}</td>
-</tr>
\ No newline at end of file
17 years, 2 months
rhmessaging commits: r1135 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-22 11:24:17 -0400 (Mon, 22 Oct 2007)
New Revision: 1135
Modified:
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/queue.strings
Log:
For the time being, removes the disk stats section and puts just the
"disk pages" property in the general set.
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-22 15:13:17 UTC (rev 1134)
+++ mgmt/cumin/python/cumin/model.py 2007-10-22 15:24:17 UTC (rev 1135)
@@ -370,20 +370,20 @@
# Disk
- measure = Measurement("diskPageSize", "int")
- measure.title = "Page size"
- measure.categories = ("disk")
- self.measurements.append(measure)
+ #measure = Measurement("diskPageSize", "int")
+ #measure.title = "Page size"
+ #measure.categories = ("disk")
+ #self.measurements.append(measure)
measure = Measurement("diskPages", "int")
- measure.title = "Pages"
- measure.categories = ("disk")
+ measure.title = "Disk pages"
+ measure.categories = ("general")
self.measurements.append(measure)
- measure = Measurement("diskAvailableSize", "int")
- measure.title = "Available size"
- measure.categories = ("disk")
- self.measurements.append(measure)
+ #measure = Measurement("diskAvailableSize", "int")
+ #measure.title = "Available size"
+ #measure.categories = ("disk")
+ #self.measurements.append(measure)
# Transactional
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-22 15:13:17 UTC (rev 1134)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-22 15:24:17 UTC (rev 1135)
@@ -178,8 +178,10 @@
<td class="twocol">
<h2>General</h2>
{general_stats}
+<!--
<h2>Disk</h2>
{disk_stats}
+-->
<h2>Persistent Messages</h2>
{persistent_stats}
</td>
17 years, 2 months
rhmessaging commits: r1134 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-22 11:13:17 -0400 (Mon, 22 Oct 2007)
New Revision: 1134
Modified:
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/queue.strings
Log:
Splits the statistics tabs into two views, current and historical.
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-22 14:58:58 UTC (rev 1133)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-22 15:13:17 UTC (rev 1134)
@@ -367,18 +367,33 @@
def render_item_low(self, session, measure):
return measure.get_low()
- def render_item_average_value(self, session, measure):
+ def render_item_average(self, session, measure):
return "%0.2f" % (sum(measure.values) / float(len(measure.values)))
-class QueueStatistics(Widget):
+class QueueStatistics(TabSet):
def __init__(self, app, name):
super(QueueStatistics, self).__init__(app, name)
- self.add_child(MeasurementSet(app, "general_stats", "general"))
- self.add_child(MeasurementSet(app, "disk_stats", "disk"))
- self.add_child(MeasurementSet \
- (app, "transactional_stats", "transactional"))
- self.add_child(MeasurementSet(app, "persistent_stats", "persistent"))
+ self.add_tab(self.StatisticsCurrent(app, "current"))
+ self.add_tab(self.StatisticsHistory(app, "history"))
def render_title(self, session, queue):
return "Statistics"
+
+ class StatisticsCurrent(Widget):
+ def __init__(self, app, name):
+ super(QueueStatistics.StatisticsCurrent, self).__init__(app, name)
+
+ self.add_child(MeasurementSet(app, "general_stats", "general"))
+ self.add_child(MeasurementSet(app, "disk_stats", "disk"))
+ self.add_child(MeasurementSet \
+ (app, "transactional_stats", "transactional"))
+ self.add_child(MeasurementSet \
+ (app, "persistent_stats", "persistent"))
+
+ def render_title(self, session, queue):
+ return "Current"
+
+ class StatisticsHistory(Widget):
+ def render_title(self, session, queue):
+ return "History"
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-22 14:58:58 UTC (rev 1133)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-22 15:13:17 UTC (rev 1134)
@@ -163,13 +163,17 @@
}())
</script>
-[QueueStatistics.css]
-table.QueueStatistics {
+[QueueStatistics.html]
+<ul class="radiotabs tabs">{tabs}</ul>
+<div class="radiotabs mode">{mode}</div>
+
+[StatisticsCurrent.css]
+table.StatisticsCurrent {
width: 100%;
}
-[QueueStatistics.html]
-<table class="QueueStatistics">
+[StatisticsCurrent.html]
+<table class="StatisticsCurrent">
<tr>
<td class="twocol">
<h2>General</h2>
17 years, 2 months
rhmessaging commits: r1133 - in mgmt/cumin/python: wooly and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-22 10:58:58 -0400 (Mon, 22 Oct 2007)
New Revision: 1133
Modified:
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/wooly/__init__.py
Log:
Fixes a template rendering of None values.
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-22 14:51:19 UTC (rev 1132)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-22 14:58:58 UTC (rev 1133)
@@ -365,10 +365,7 @@
return measure.get_high()
def render_item_low(self, session, measure):
- if measure.highlow:
- print type(measure.get_low())
-
- return measure.get_low()
+ return measure.get_low()
def render_item_average_value(self, session, measure):
return "%0.2f" % (sum(measure.values) / float(len(measure.values)))
Modified: mgmt/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/cumin/python/wooly/__init__.py 2007-10-22 14:51:19 UTC (rev 1132)
+++ mgmt/cumin/python/wooly/__init__.py 2007-10-22 14:58:58 UTC (rev 1133)
@@ -677,11 +677,19 @@
writer.write(elem)
elif callable(elem):
result = elem(self.widget, session, object)
- writer.write(result == None and "" or str(result))
+
+ if result is None:
+ result = ""
+
+ writer.write(str(result))
else:
result = elem.render(session, object)
- writer.write(result == None and "" or str(result))
+ if result is None:
+ result = ""
+
+ writer.write(str(result))
+
class WidgetCall(object):
def __init__(self, stack, widget, session, object):
self.stack = stack
17 years, 2 months
rhmessaging commits: r1132 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-22 10:51:19 -0400 (Mon, 22 Oct 2007)
New Revision: 1132
Modified:
mgmt/cumin/python/cumin/queue.strings
Log:
Style adjustments.
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-22 14:40:03 UTC (rev 1131)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-22 14:51:19 UTC (rev 1132)
@@ -186,10 +186,24 @@
</tr>
</table>
+[MeasurementSet.css]
+table.MeasurementSet td, table.MeasurementSet th {
+ text-align: right;
+}
+
+table.MeasurementSet th.label {
+ text-align: left;
+}
+
[MeasurementSet.html]
-<table class="mobjects">
+<table class="MeasurementSet mobjects">
+ <col class="name"/>
+ <col class="data"/>
+ <col class="data"/>
+ <col class="data"/>
+
<tr>
- <th>Statistic</th>
+ <th class="label">Statistic</th>
<th>Current</th>
<th>High</th>
<th>Low</th>
@@ -200,7 +214,7 @@
[MeasurementSet.item_html]
<tr>
- <th>{item_title}</th>
+ <th class="label">{item_title}</th>
<td>{item_value}</td>
<td>{item_high}</td>
<td>{item_low}</td>
17 years, 2 months
rhmessaging commits: r1131 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-22 10:40:03 -0400 (Mon, 22 Oct 2007)
New Revision: 1131
Modified:
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/queue.py
Log:
Makes the stats use the stats' list's sorting. Shortens the disk stat
names.
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-22 14:28:31 UTC (rev 1130)
+++ mgmt/cumin/python/cumin/model.py 2007-10-22 14:40:03 UTC (rev 1131)
@@ -371,17 +371,17 @@
# Disk
measure = Measurement("diskPageSize", "int")
- measure.title = "Disk page size"
+ measure.title = "Page size"
measure.categories = ("disk")
self.measurements.append(measure)
measure = Measurement("diskPages", "int")
- measure.title = "Disk pages"
+ measure.title = "Pages"
measure.categories = ("disk")
self.measurements.append(measure)
measure = Measurement("diskAvailableSize", "int")
- measure.title = "Disk available size"
+ measure.title = "Available size"
measure.categories = ("disk")
self.measurements.append(measure)
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-22 14:28:31 UTC (rev 1130)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-22 14:40:03 UTC (rev 1131)
@@ -347,7 +347,7 @@
self.category = category
def get_items(self, session, queue):
- measures = sorted_by(queue.measurements, "title")
+ measures = list(queue.measurements)
for measure in queue.measurements:
if self.category not in measure.categories:
17 years, 2 months
rhmessaging commits: r1130 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-22 10:28:31 -0400 (Mon, 22 Oct 2007)
New Revision: 1130
Modified:
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/queue.strings
Log:
Adds a missing intrumentation prop to queue. Fixes rendering of null
values in templates. Adds high and low values to Measurement.
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-22 14:00:08 UTC (rev 1129)
+++ mgmt/cumin/python/cumin/model.py 2007-10-22 14:28:31 UTC (rev 1130)
@@ -277,6 +277,10 @@
self.__value = None
self.values = list()
+ self.highlow = False
+ self.__high = None
+ self.__low = None
+
if type == "int":
self.add_value(0)
@@ -287,9 +291,26 @@
if len(self.values) > 1000:
del self.values[0]
+ if self.highlow:
+ if self.__high == None or self.__low == None:
+ self.__high = value
+ self.__low = value
+ else:
+ if self.__high < value:
+ self.__high = value
+
+ if self.__low > value:
+ self.__low = value
+
def get_value(self):
return self.__value
+ def get_high(self):
+ return self.__high
+
+ def get_low(self):
+ return self.__low
+
class Queue(ModelObject):
def __init__(self, model):
super(Queue, self).__init__(model, model.queue)
@@ -312,6 +333,7 @@
measure = Measurement("msgDepth", "int")
measure.title = "Message depth"
measure.categories = ("message", "general")
+ measure.highlow = True
self.measurements.append(measure)
measure = Measurement("msgTotalEnqueues", "int")
@@ -327,6 +349,7 @@
measure = Measurement("byteDepth", "int")
measure.title = "Byte depth"
measure.categories = ("byte", "general")
+ measure.highlow = True
self.measurements.append(measure)
measure = Measurement("byteTotalEnqueues", "int")
@@ -339,6 +362,12 @@
measure.categories = ("byte", "general")
self.measurements.append(measure)
+ measure = Measurement("consumers", "int")
+ measure.title = "Consumers"
+ measure.categories = ("general")
+ measure.highlow = True
+ self.measurements.append(measure)
+
# Disk
measure = Measurement("diskPageSize", "int")
@@ -396,6 +425,7 @@
measure = Measurement("enqueueTxCount", "int")
measure.title = "Enq. trans. pending"
measure.categories = ("transactional")
+ measure.highlow = True
self.measurements.append(measure)
measure = Measurement("dequeueTxStarts", "int")
@@ -416,6 +446,7 @@
measure = Measurement("dequeueTxCount", "int")
measure.title = "Deq. trans. pending"
measure.categories = ("transactional")
+ measure.highlow = True
self.measurements.append(measure)
# Persistent
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-22 14:00:08 UTC (rev 1129)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-22 14:28:31 UTC (rev 1130)
@@ -361,6 +361,15 @@
def render_item_value(self, session, measure):
return measure.get_value()
+ def render_item_high(self, session, measure):
+ return measure.get_high()
+
+ def render_item_low(self, session, measure):
+ if measure.highlow:
+ print type(measure.get_low())
+
+ return measure.get_low()
+
def render_item_average_value(self, session, measure):
return "%0.2f" % (sum(measure.values) / float(len(measure.values)))
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-22 14:00:08 UTC (rev 1129)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-22 14:28:31 UTC (rev 1130)
@@ -191,7 +191,8 @@
<tr>
<th>Statistic</th>
<th>Current</th>
- <th>Average</th>
+ <th>High</th>
+ <th>Low</th>
</tr>
{items}
@@ -201,5 +202,6 @@
<tr>
<th>{item_title}</th>
<td>{item_value}</td>
- <td>{item_average_value}</td>
+ <td>{item_high}</td>
+ <td>{item_low}</td>
</tr>
\ No newline at end of file
17 years, 2 months
rhmessaging commits: r1129 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-22 10:00:08 -0400 (Mon, 22 Oct 2007)
New Revision: 1129
Modified:
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/page.strings
Log:
Shortens some stat field titles and nudges table styling.
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-22 13:45:12 UTC (rev 1128)
+++ mgmt/cumin/python/cumin/model.py 2007-10-22 14:00:08 UTC (rev 1129)
@@ -379,42 +379,42 @@
self.measurements.append(measure)
measure = Measurement("enqueueTxStarts", "int")
- measure.title = "Enqueue transactions started"
+ measure.title = "Enq. trans. started"
measure.categories = ("transactional")
self.measurements.append(measure)
measure = Measurement("enqueueTxCommits", "int")
- measure.title = "Enqueue transactions committed"
+ measure.title = "Enq. trans. committed"
measure.categories = ("transactional")
self.measurements.append(measure)
measure = Measurement("enqueueTxRejects", "int")
- measure.title = "Enqueue transactions rejected"
+ measure.title = "Enq. trans. rejected"
measure.categories = ("transactional")
self.measurements.append(measure)
measure = Measurement("enqueueTxCount", "int")
- measure.title = "Enqueue transactions pending"
+ measure.title = "Enq. trans. pending"
measure.categories = ("transactional")
self.measurements.append(measure)
measure = Measurement("dequeueTxStarts", "int")
- measure.title = "Dequeue transactions started"
+ measure.title = "Deq. trans. started"
measure.categories = ("transactional")
self.measurements.append(measure)
measure = Measurement("dequeueTxCommits", "int")
- measure.title = "Dequeue transactions committed"
+ measure.title = "Deq. trans. committed"
measure.categories = ("transactional")
self.measurements.append(measure)
measure = Measurement("dequeueTxRejects", "int")
- measure.title = "Dequeue transactions rejected"
+ measure.title = "Deq. trans. rejected"
measure.categories = ("transactional")
self.measurements.append(measure)
measure = Measurement("dequeueTxCount", "int")
- measure.title = "Dequeue transactions pending"
+ measure.title = "Deq. trans. pending"
measure.categories = ("transactional")
self.measurements.append(measure)
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2007-10-22 13:45:12 UTC (rev 1128)
+++ mgmt/cumin/python/cumin/page.strings 2007-10-22 14:00:08 UTC (rev 1129)
@@ -214,11 +214,11 @@
}
table.mobjects td {
- padding: 0.5em;
+ padding: 0.35em 0.5em;
}
table.mobjects th {
- padding: 0.25em 0.5em;
+ padding: 0.35em 0.5em;
}
table.mobjects th {
17 years, 2 months