Author: justi9
Date: 2008-04-17 11:38:22 -0400 (Thu, 17 Apr 2008)
New Revision: 1924
Modified:
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/queue.strings
mgmt/notes/justin-todo.txt
Log:
Finish reorganization of queue stats. Add separate views for
transaction and durability stats. Recategorize some stats. Add new
charts.
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2008-04-16 16:14:16 UTC (rev 1923)
+++ mgmt/cumin/python/cumin/model.py 2008-04-17 15:38:22 UTC (rev 1924)
@@ -565,76 +565,56 @@
stat = CuminStat(self, "msgDepth")
stat.title = "Message Depth"
stat.unit = "message"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat.highlow = True
stat = CuminStat(self, "msgTotalEnqueues")
stat.title = "Msgs. Enqueued"
stat.unit = "message"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat = CuminStat(self, "msgTotalDequeues")
stat.title = "Msgs. Dequeued"
stat.unit = "message"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat = CuminStat(self, "byteDepth")
stat.title = "Byte Depth"
stat.unit = "byte"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat.highlow = True
stat = CuminStat(self, "byteTotalEnqueues")
stat.title = "Bytes Enqueued"
stat.unit = "byte"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat = CuminStat(self, "byteTotalDequeues")
stat.title = "Bytes Dequeued"
stat.unit = "byte"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat = CuminStat(self, "unackedMessages")
stat.title = "Msgs. Unacked"
stat.unit = "message"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat.highlow = True
stat = CuminStat(self, "messageLatencyMin")
stat.title = "Min. Msg. Latency"
stat.unit = "nanosecond"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat = CuminStat(self, "messageLatencyMax")
stat.title = "Max. Msg. Latency"
stat.unit = "nanosecond"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat = CuminStat(self, "messageLatencyAverage")
stat.title = "Avg. Msg. Latency"
stat.unit = "nanosecond"
- stat.categories = ("general",)
+ stat.categories = ("message",)
- stat = CuminStat(self, "messageLatencySamples")
- stat.title = "Msg. Latency Samples"
- stat.unit = "sample"
- stat.categories = ("general",)
-
- # Disk
-
- #stat = CuminStat(self, "diskPageSize")
- #stat.title = "Page size"
- #stat.categories = ("disk",)
-
- #stat = CuminStat(self, "diskPages")
- #stat.title = "Disk Pages"
- #stat.unit = "page"
- #stat.categories = ("general",)
-
- #stat = CuminStat(self, "diskAvailableSize")
- #stat.title = "Available size"
- #stat.categories = ("disk")
-
# Transactional
stat = CuminStat(self, "msgTxnEnqueues")
@@ -773,32 +753,32 @@
stat = CuminStat(self, "msgReceives")
stat.title = "Msgs. Received"
stat.unit = "message"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat = CuminStat(self, "msgRoutes")
stat.title = "Msgs. Routed"
stat.unit = "message"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat = CuminStat(self, "msgDrops")
stat.title = "Msgs. Dropped"
stat.unit = "message"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat = CuminStat(self, "byteReceives")
stat.title = "Bytes Received"
stat.unit = "message"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat = CuminStat(self, "byteRoutes")
stat.title = "Bytes Routed"
stat.unit = "message"
- stat.categories = ("general",)
+ stat.categories = ("message",)
stat = CuminStat(self, "byteDrops")
stat.title = "Bytes Dropped"
stat.unit = "message"
- stat.categories = ("general",)
+ stat.categories = ("message",)
def show_object(self, session, exchange):
frame = self.cumin_model.show_main(session)
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2008-04-16 16:14:16 UTC (rev 1923)
+++ mgmt/cumin/python/cumin/queue.py 2008-04-17 15:38:22 UTC (rev 1924)
@@ -428,17 +428,19 @@
def __init__(self, app, name):
super(QueueStats, self).__init__(app, name)
- self.add_tab(GeneralQueueStats(app, "general"))
+ self.add_tab(QueueStatsGeneral(app, "gen"))
+ self.add_tab(QueueStatsDurability(app, "dur"))
+ self.add_tab(QueueStatsTransactions(app, "txn"))
def render_title(self, session):
return "Statistics"
-class GeneralQueueStats(Widget):
+class QueueStatsGeneral(Widget):
def __init__(self, app, name):
- super(GeneralQueueStats, self).__init__(app, name)
+ super(QueueStatsGeneral, self).__init__(app, name)
self.add_child(StatSet(app, "general", "general"))
- self.add_child(StatSet(app, "disk", "disk"))
+ self.add_child(StatSet(app, "messages", "message"))
chart = self.EnqueueDequeueRateChart(app, "enqdeq")
self.add_child(chart)
@@ -455,8 +457,8 @@
class EnqueueDequeueRateChart(StatValueChart):
def __init__(self, app, name):
- super(GeneralQueueStats.EnqueueDequeueRateChart, self).__init__ \
- (app, name)
+ super(QueueStatsGeneral.EnqueueDequeueRateChart,
+ self).__init__(app, name)
self.stats = ("msgTotalEnqueues", "msgTotalDequeues")
self.mode = "rate"
@@ -466,13 +468,76 @@
class DepthChart(StatValueChart):
def __init__(self, app, name):
- super(GeneralQueueStats.DepthChart, self).__init__(app, name)
+ super(QueueStatsGeneral.DepthChart, self).__init__(app, name)
self.stats = ("msgDepth",)
def render_title(self, session, queue):
return "Queue Depth"
+class QueueStatsDurability(Widget):
+ def __init__(self, app, name):
+ super(QueueStatsDurability, self).__init__(app, name)
+
+ self.add_child(StatSet(app, "messages", "persistent"))
+
+ chart = self.EnqueueDequeueRateChart(app, "enqdeq")
+ self.add_child(chart)
+
+ def render_title(self, session):
+ return "Durability"
+
+ class EnqueueDequeueRateChart(StatValueChart):
+ def __init__(self, app, name):
+ super(QueueStatsDurability.EnqueueDequeueRateChart,
+ self).__init__(app, name)
+
+ self.stats = ("msgPersistEnqueues",
"msgPersistDequeues")
+ self.mode = "rate"
+
+ def render_title(self, session, queue):
+ return "Enqueues and Dequeues per Second"
+
+class QueueStatsTransactions(Widget):
+ def __init__(self, app, name):
+ super(QueueStatsTransactions, self).__init__(app, name)
+
+ self.add_child(StatSet(app, "transactions", "transaction"))
+ self.add_child(StatSet(app, "messages", "transactional"))
+
+ chart = self.EnqueueTransactionRateChart(app, "enqtxn")
+ self.add_child(chart)
+
+ chart = self.DequeueTransactionRateChart(app, "deqtxn")
+ self.add_child(chart)
+
+ def render_title(self, session):
+ return "Transactions"
+
+ class EnqueueTransactionRateChart(StatValueChart):
+ def __init__(self, app, name):
+ super(QueueStatsTransactions.EnqueueTransactionRateChart,
+ self).__init__(app, name)
+
+ self.stats = ("enqueueTxnStarts", "enqueueTxnCommits",
+ "enqueueTxnRejects")
+ self.mode = "rate"
+
+ def render_title(self, session, queue):
+ return "Enqueue Transaction Operations per Second"
+
+ class DequeueTransactionRateChart(StatValueChart):
+ def __init__(self, app, name):
+ super(QueueStatsTransactions.DequeueTransactionRateChart,
+ self).__init__(app, name)
+
+ self.stats = ("dequeueTxnStarts", "dequeueTxnCommits",
+ "dequeueTxnRejects")
+ self.mode = "rate"
+
+ def render_title(self, session, queue):
+ return "Dequeue Transaction Operations per Second"
+
class QueueConsumerSet(PaginatedItemSet):
def get_args(self, session):
return self.frame.get_args(session)
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2008-04-16 16:14:16 UTC (rev 1923)
+++ mgmt/cumin/python/cumin/queue.strings 2008-04-17 15:38:22 UTC (rev 1924)
@@ -185,10 +185,14 @@
<ul class="radiotabs tabs">{tabs}</ul>
<div class="radiotabs mode">{mode}</div>
-[GeneralQueueStats.html]
+[QueueStatsGeneral.html]
<table class="layout">
<tr>
<td class="twocol">
+ <h2>Messages</h2>
+ {messages}
+
+ <h2>General</h2>
{general}
</td>
<td class="twocol">
@@ -199,6 +203,36 @@
</tr>
</table>
+[QueueStatsDurability.html]
+<table class="layout">
+ <tr>
+ <td class="twocol">
+ <h2>Durable Messages</h2>
+ {messages}
+ </td>
+ <td class="twocol">
+ {enqdeq}
+ </td>
+ </tr>
+</table>
+
+[QueueStatsTransactions.html]
+<table class="layout">
+ <tr>
+ <td class="twocol">
+ <h2>Transactions</h2>
+ {transactions}
+
+ <h2>Transactional Messages</h2>
+ {messages}
+ </td>
+ <td class="twocol">
+ {enqtxn}
+ {deqtxn}
+ </td>
+ </tr>
+</table>
+
[QueueConsumerSet.html]
<div class="sactions">
<h2>Act on Selected Consumers:</h2>
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2008-04-16 16:14:16 UTC (rev 1923)
+++ mgmt/notes/justin-todo.txt 2008-04-17 15:38:22 UTC (rev 1924)
@@ -28,6 +28,14 @@
* Check for per-row querying in BrokerSet
+ * stat.py:222 min_value is None somehow
+
+ * Need to prompt for password confirmation
+
+ * Blow up if someone adds a child with an existing name
+
+ * Fix the chart left side "pinch" problem
+
Deferred
* En dashes don't disappear on stat update