[rhmessaging-commits] rhmessaging commits: r1837 - mgmt/cumin/python/cumin.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Fri Apr 4 09:44:32 EDT 2008
Author: justi9
Date: 2008-04-04 09:44:32 -0400 (Fri, 04 Apr 2008)
New Revision: 1837
Modified:
mgmt/cumin/python/cumin/model.py
Log:
Simplify the ui metadata, and correctly specify the category tuple.
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2008-04-03 21:11:41 UTC (rev 1836)
+++ mgmt/cumin/python/cumin/model.py 2008-04-04 13:44:32 UTC (rev 1837)
@@ -166,11 +166,10 @@
self.status, self.args, self.exception
class CuminStat(object):
- def __init__(self, cls, name, type):
+ def __init__(self, cls, name):
self.model = cls.model
self.cumin_class = cls
self.name = name
- self.type = type
self.unit = None
self.title = None
self.categories = ()
@@ -213,7 +212,7 @@
if value is None:
text = ""
- elif self.type is int:
+ elif type(value) in (int, long):
if value == 0:
text = "0"
else:
@@ -440,176 +439,176 @@
def __init__(self, model):
super(CuminQueue, self).__init__(model, "queue", Queue, QueueStats)
- stat = CuminStat(self, "consumers", int)
+ stat = CuminStat(self, "consumers")
stat.title = "Consumers"
stat.unit = "consumer"
stat.categories = ("general")
stat.highlow = True
- stat = CuminStat(self, "bindings", int)
+ stat = CuminStat(self, "bindings")
stat.title = "Bindings"
stat.unit = "binding"
stat.categories = ("general")
stat.highlow = True
- stat = CuminStat(self, "msgDepth", int)
+ stat = CuminStat(self, "msgDepth")
stat.title = "Message Depth"
stat.unit = "message"
stat.categories = ("message", "general")
stat.highlow = True
- stat = CuminStat(self, "msgTotalEnqueues", int)
+ stat = CuminStat(self, "msgTotalEnqueues")
stat.title = "Msgs. Enqueued"
stat.unit = "message"
stat.categories = ("message", "general")
- stat = CuminStat(self, "msgTotalDequeues", int)
+ stat = CuminStat(self, "msgTotalDequeues")
stat.title = "Msgs. Dequeued"
stat.unit = "message"
stat.categories = ("message", "general")
- stat = CuminStat(self, "byteDepth", int)
+ stat = CuminStat(self, "byteDepth")
stat.title = "Byte Depth"
stat.unit = "byte"
stat.categories = ("byte", "general")
stat.highlow = True
- stat = CuminStat(self, "byteTotalEnqueues", int)
+ stat = CuminStat(self, "byteTotalEnqueues")
stat.title = "Bytes Enqueued"
stat.unit = "byte"
stat.categories = ("byte", "general")
- stat = CuminStat(self, "byteTotalDequeues", int)
+ stat = CuminStat(self, "byteTotalDequeues")
stat.title = "Bytes Dequeued"
stat.unit = "byte"
stat.categories = ("byte", "general")
- stat = CuminStat(self, "unackedMessages", int)
+ stat = CuminStat(self, "unackedMessages")
stat.title = "Msgs. Unacked"
stat.unit = "message"
stat.categories = ("general")
stat.highlow = True
- stat = CuminStat(self, "messageLatencyMin", int)
+ stat = CuminStat(self, "messageLatencyMin")
stat.title = "Min. Msg. Latency"
stat.unit = "nanosecond"
stat.categories = ("general")
- stat = CuminStat(self, "messageLatencyMax", int)
+ stat = CuminStat(self, "messageLatencyMax")
stat.title = "Max. Msg. Latency"
stat.unit = "nanosecond"
stat.categories = ("general")
- stat = CuminStat(self, "messageLatencyAverage", int)
+ stat = CuminStat(self, "messageLatencyAverage")
stat.title = "Avg. Msg. Latency"
stat.unit = "nanosecond"
stat.categories = ("general")
- stat = CuminStat(self, "messageLatencySamples", int)
+ stat = CuminStat(self, "messageLatencySamples")
stat.title = "Msg. Latency Samples"
stat.unit = "sample"
stat.categories = ("general")
# Disk
- #stat = CuminStat(self, "diskPageSize", int)
+ #stat = CuminStat(self, "diskPageSize")
#stat.title = "Page size"
#stat.categories = ("disk")
- #stat = CuminStat(self, "diskPages", int)
+ #stat = CuminStat(self, "diskPages")
#stat.title = "Disk Pages"
#stat.unit = "page"
#stat.categories = ("general")
- #stat = CuminStat(self, "diskAvailableSize", int)
+ #stat = CuminStat(self, "diskAvailableSize")
#stat.title = "Available size"
#stat.categories = ("disk")
# Transactional
- stat = CuminStat(self, "msgTxnEnqueues", int)
+ stat = CuminStat(self, "msgTxnEnqueues")
stat.title = "Msgs. Enqueued"
stat.unit = "message"
- stat.categories = ("message", "transactional")
+ stat.categories = ("transactional",)
- stat = CuminStat(self, "msgTxnDequeues", int)
+ stat = CuminStat(self, "msgTxnDequeues")
stat.title = "Msgs. Dequeued"
stat.unit = "message"
- stat.categories = ("message", "transactional")
+ stat.categories = ("transactional",)
- stat = CuminStat(self, "byteTxnEnqueues", int)
+ stat = CuminStat(self, "byteTxnEnqueues")
stat.title = "Bytes Enqueued"
stat.unit = "byte"
- stat.categories = ("byte", "transactional")
+ stat.categories = ("transactional",)
- stat = CuminStat(self, "byteTxnDequeues", int)
+ stat = CuminStat(self, "byteTxnDequeues")
stat.title = "Bytes Dequeued"
stat.unit = "byte"
- stat.categories = ("byte", "transactional")
+ stat.categories = ("transactional",)
- stat = CuminStat(self, "enqueueTxnStarts", int)
+ stat = CuminStat(self, "enqueueTxnStarts")
stat.title = "Enq. Trans. Started"
stat.unit = "transaction"
- stat.categories = ("transaction")
+ stat.categories = ("transaction",)
- stat = CuminStat(self, "enqueueTxnCommits", int)
+ stat = CuminStat(self, "enqueueTxnCommits")
stat.title = "Enq. Trans. Committed"
stat.unit = "transaction"
- stat.categories = ("transaction")
+ stat.categories = ("transaction",)
- stat = CuminStat(self, "enqueueTxnRejects", int)
+ stat = CuminStat(self, "enqueueTxnRejects")
stat.title = "Enq. Trans. Rejected"
stat.unit = "transaction"
- stat.categories = ("transaction")
+ stat.categories = ("transaction",)
- stat = CuminStat(self, "enqueueTxnCount", int)
+ stat = CuminStat(self, "enqueueTxnCount")
stat.title = "Enq. Trans. Pending"
stat.unit = "transaction"
- stat.categories = ("transaction")
+ stat.categories = ("transaction",)
stat.highlow = True
- stat = CuminStat(self, "dequeueTxnStarts", int)
+ stat = CuminStat(self, "dequeueTxnStarts")
stat.title = "Deq. Trans. Started"
stat.unit = "transaction"
- stat.categories = ("transaction")
+ stat.categories = ("transaction",)
- stat = CuminStat(self, "dequeueTxnCommits", int)
+ stat = CuminStat(self, "dequeueTxnCommits")
stat.title = "Deq. Trans. Committed"
stat.unit = "transaction"
- stat.categories = ("transaction")
+ stat.categories = ("transaction",)
- stat = CuminStat(self, "dequeueTxnRejects", int)
+ stat = CuminStat(self, "dequeueTxnRejects")
stat.title = "Deq. Trans. Rejected"
stat.unit = "transaction"
- stat.categories = ("transaction")
+ stat.categories = ("transaction",)
- stat = CuminStat(self, "dequeueTxnCount", int)
+ stat = CuminStat(self, "dequeueTxnCount")
stat.title = "Deq. Trans. Pending"
stat.unit = "transaction"
- stat.categories = ("transaction")
+ stat.categories = ("transaction",)
stat.highlow = True
# Persistent
- stat = CuminStat(self, "msgPersistEnqueues", int)
+ stat = CuminStat(self, "msgPersistEnqueues")
stat.title = "Msgs. Enqueued"
stat.unit = "message"
- stat.categories = ("message", "persistent")
+ stat.categories = ("persistent",)
- stat = CuminStat(self, "msgPersistDequeues", int)
+ stat = CuminStat(self, "msgPersistDequeues")
stat.title = "Msgs. Dequeued"
stat.unit = "message"
- stat.categories = ("message", "persistent")
+ stat.categories = ("persistent",)
- stat = CuminStat(self, "bytePersistEnqueues", int)
+ stat = CuminStat(self, "bytePersistEnqueues")
stat.title = "Bytes Enqueued"
stat.unit = "byte"
- stat.categories = ("byte", "persistent")
+ stat.categories = ("persistent",)
- stat = CuminStat(self, "bytePersistDequeues", int)
+ stat = CuminStat(self, "bytePersistDequeues")
stat.title = "Bytes Dequeued"
stat.unit = "byte"
- stat.categories = ("byte", "persistent")
+ stat.categories = ("persistent",)
self.Purge(self, "purge")
@@ -628,47 +627,47 @@
super(CuminExchange, self).__init__(model, "exchange",
Exchange, ExchangeStats)
- stat = CuminStat(self, "producers", int)
+ stat = CuminStat(self, "producers")
stat.title = "Producers"
stat.unit = "producer"
- stat.categories = ("general")
+ stat.categories = ("general",)
stat.highlow = True
- stat = CuminStat(self, "bindings", int)
+ stat = CuminStat(self, "bindings")
stat.title = "Bindings"
stat.unit = "binding"
- stat.categories = ("general")
+ stat.categories = ("general",)
stat.highlow = True
- stat = CuminStat(self, "msgReceives", int)
+ stat = CuminStat(self, "msgReceives")
stat.title = "Msgs. Received"
stat.unit = "message"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "msgRoutes", int)
+ stat = CuminStat(self, "msgRoutes")
stat.title = "Msgs. Routed"
stat.unit = "message"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "msgDrops", int)
+ stat = CuminStat(self, "msgDrops")
stat.title = "Msgs. Dropped"
stat.unit = "message"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "byteReceives", int)
+ stat = CuminStat(self, "byteReceives")
stat.title = "Bytes Received"
stat.unit = "message"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "byteRoutes", int)
+ stat = CuminStat(self, "byteRoutes")
stat.title = "Bytes Routed"
stat.unit = "message"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "byteDrops", int)
+ stat = CuminStat(self, "byteDrops")
stat.title = "Bytes Dropped"
stat.unit = "message"
- stat.categories = ("general")
+ stat.categories = ("general",)
def get_title(self, session):
return "Exchange"
@@ -678,10 +677,10 @@
super(CuminBinding, self).__init__(model, "binding",
Binding, BindingStats)
- stat = CuminStat(self, "msgMatched", int)
+ stat = CuminStat(self, "msgMatched")
stat.title = "Msgs. Matched"
stat.unit = "message"
- stat.categories = ("general")
+ stat.categories = ("general",)
def get_title(self, session):
return "Binding"
@@ -693,29 +692,29 @@
def __init__(self, model):
super(CuminClient, self).__init__(model, "client", Client, ClientStats)
- stat = CuminStat(self, "closing", bool)
+ stat = CuminStat(self, "closing")
stat.title = "Closing Down"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "bytesFromClient", int)
+ stat = CuminStat(self, "bytesFromClient")
stat.title = "Bytes Sent"
stat.unit = "byte"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "bytesToClient", int)
+ stat = CuminStat(self, "bytesToClient")
stat.title = "Bytes Received"
stat.unit = "byte"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "framesFromClient", int)
+ stat = CuminStat(self, "framesFromClient")
stat.title = "Frames Sent"
stat.unit = "frame"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "framesToClient", int)
+ stat = CuminStat(self, "framesToClient")
stat.title = "Frames Received"
stat.unit = "frame"
- stat.categories = ("general")
+ stat.categories = ("general",)
self.Close(self, "close")
@@ -737,18 +736,18 @@
super(CuminSession, self).__init__(model, "session",
Session, SessionStats)
- stat = CuminStat(self, "expireTime", datetime)
+ stat = CuminStat(self, "expireTime")
stat.title = "Expiration"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "framesOutstanding", int)
+ stat = CuminStat(self, "framesOutstanding")
stat.title = "Frames Outstanding"
stat.unit = "frame"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "attached", bool)
+ stat = CuminStat(self, "attached")
stat.title = "Attached"
- stat.categories = ("general")
+ stat.categories = ("general",)
self.Close(self, "close")
self.Detach(self, "detach")
@@ -790,29 +789,29 @@
def __init__(self, model):
super(CuminLink, self).__init__(model, "link", Link, LinkStats)
- stat = CuminStat(self, "closing", bool)
+ stat = CuminStat(self, "closing")
stat.title = "Closing Down"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "framesFromPeer", int)
+ stat = CuminStat(self, "framesFromPeer")
stat.title = "Frames from Peer"
stat.unit = "frame"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "framesToPeer", int)
+ stat = CuminStat(self, "framesToPeer")
stat.title = "Frames to Peer"
stat.unit = "frame"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "bytesFromPeer", int)
+ stat = CuminStat(self, "bytesFromPeer")
stat.title = "Bytes from Peer"
stat.unit = "byte"
- stat.categories = ("general")
+ stat.categories = ("general",)
- stat = CuminStat(self, "bytesToPeer", int)
+ stat = CuminStat(self, "bytesToPeer")
stat.title = "Bytes to Peer"
stat.unit = "byte"
- stat.categories = ("general")
+ stat.categories = ("general",)
def get_title(self, session):
return "Broker Link"
More information about the rhmessaging-commits
mailing list