qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject qpid-dispatch git commit: NO-JIRA - Converted the cryptic address column in qdstat to three columns for class, address, and phase.
Date Thu, 31 Mar 2016 18:30:24 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 9d08d0a67 -> f3561a66c


NO-JIRA - Converted the cryptic address column in qdstat to three columns for class, address,
and phase.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/f3561a66
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/f3561a66
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/f3561a66

Branch: refs/heads/master
Commit: f3561a66c6ffd091835d4e56cd4decd57c4501af
Parents: 9d08d0a
Author: Ted Ross <tross@redhat.com>
Authored: Thu Mar 31 14:29:26 2016 -0400
Committer: Ted Ross <tross@redhat.com>
Committed: Thu Mar 31 14:29:26 2016 -0400

----------------------------------------------------------------------
 tools/qdstat | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f3561a66/tools/qdstat
----------------------------------------------------------------------
diff --git a/tools/qdstat b/tools/qdstat
index a0f080b..94c1196 100755
--- a/tools/qdstat
+++ b/tools/qdstat
@@ -149,20 +149,19 @@ class BusManager(Node):
 
     def _addr_class(self, addr):
         if not addr:
-            return "-"
-        return addr[0]
+            return ""
         if addr[0] == 'M' : return "mobile"
         if addr[0] == 'R' : return "router"
         if addr[0] == 'A' : return "area"
         if addr[0] == 'L' : return "local"
         if addr[0] == 'T' : return "topo"
-        if addr[0] == 'C' : return "link-incoming"
-        if addr[0] == 'D' : return "link-outgoing"
+        if addr[0] == 'C' : return "link-in"
+        if addr[0] == 'D' : return "link-out"
         return "unknown: %s" % addr[0]
 
     def _addr_text(self, addr):
         if not addr:
-            return "-"
+            return ""
         if addr[0] == 'M':
             return addr[2:]
         else:
@@ -170,7 +169,7 @@ class BusManager(Node):
 
     def _addr_phase(self, addr):
         if not addr:
-            return "-"
+            return ""
         if addr[0] == 'M':
             return addr[1]
         return ''
@@ -217,7 +216,9 @@ class BusManager(Node):
         heads.append(Header("dir"))
         heads.append(Header("id"))
         heads.append(Header("peer"))
+        heads.append(Header("class"))
         heads.append(Header("addr"))
+        heads.append(Header("phs"))
         heads.append(Header("cap"))
         heads.append(Header("undel"))
         heads.append(Header("unsettled"))
@@ -236,7 +237,9 @@ class BusManager(Node):
             row.append(link.linkDir)
             row.append(link.identity)
             row.append(link.peer)
-            row.append(self._addr_summary(link.owningAddr))
+            row.append(self._addr_class(link.owningAddr))
+            row.append(self._addr_text(link.owningAddr))
+            row.append(self._addr_phase(link.owningAddr))
             row.append(link.capacity)
             row.append(link.undeliveredCount)
             row.append(link.unsettledCount)
@@ -288,7 +291,9 @@ class BusManager(Node):
     def displayAddresses(self):
         disp = Display(prefix="  ")
         heads = []
+        heads.append(Header("class"))
         heads.append(Header("addr"))
+        heads.append(Header("phs"))
         heads.append(Header("distrib"))
         heads.append(Header("in-proc", Header.COMMAS))
         heads.append(Header("local", Header.COMMAS))
@@ -305,7 +310,9 @@ class BusManager(Node):
 
         for addr in objects:
             row = []
-            row.append(self._addr_summary(addr.name))
+            row.append(self._addr_class(addr.name))
+            row.append(self._addr_text(addr.name))
+            row.append(self._addr_phase(addr.name))
             row.append(addr.distribution)
             row.append(addr.inProcess)
             row.append(addr.subscriberCount)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message