qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject qpid-dispatch git commit: DISPATCH-1208: Fix inefficiency when handling large numbers of links
Date Tue, 04 Dec 2018 18:12:21 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 3b0bad143 -> b0e025d38


DISPATCH-1208: Fix inefficiency when handling large numbers of links


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

Branch: refs/heads/master
Commit: b0e025d381eb0fb0a156a378c26d49b51ba43159
Parents: 3b0bad1
Author: Chuck Rolke <crolke@redhat.com>
Authored: Tue Dec 4 13:11:14 2018 -0500
Committer: Chuck Rolke <crolke@redhat.com>
Committed: Tue Dec 4 13:11:14 2018 -0500

----------------------------------------------------------------------
 tools/scraper/parser.py  |  2 +-
 tools/scraper/scraper.py | 34 +++++++++++++++++-----------------
 2 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/b0e025d3/tools/scraper/parser.py
----------------------------------------------------------------------
diff --git a/tools/scraper/parser.py b/tools/scraper/parser.py
index 5df3ecf..518be95 100755
--- a/tools/scraper/parser.py
+++ b/tools/scraper/parser.py
@@ -433,7 +433,7 @@ class ParsedLogLine(object):
             res.role = "receiver" if resdict["role"] == "true" else "sender"
             res.is_receiver = res.role == "receiver"
             name = self.resdict_value(resdict, "name", "None")
-            res.link_short_name_popup = self.shorteners.short_link_names.translate(name,
True)
+            res.link_short_name_popup = self.shorteners.short_link_names.translate(name,
True, customer=self)
             res.link_short_name = self.shorteners.short_link_names.translate(name, False)
             tmpsrc = self.resdict_value(resdict, "source", None)
             tmptgt = self.resdict_value(resdict, "target", None)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/b0e025d3/tools/scraper/scraper.py
----------------------------------------------------------------------
diff --git a/tools/scraper/scraper.py b/tools/scraper/scraper.py
index 344d2e1..6536ac8 100755
--- a/tools/scraper/scraper.py
+++ b/tools/scraper/scraper.py
@@ -225,6 +225,7 @@ def main_except(argv):
 
     # sort transfer short name customer lists
     comn.shorteners.short_data_names.sort_customers()
+    comn.shorteners.short_link_names.sort_customers()
 
     #
     # Start producing the output stream
@@ -625,23 +626,22 @@ def main_except(argv):
               "<th>T delta</th> <th>T elapsed</th></tr>")
         t0 = None
         tlast = None
-        for plf in tree:
-            if plf.data.name == "attach" and plf.data.link_short_name == sname:
-                if t0 is None:
-                    t0 = plf.datetime
-                    delta = "0.000000"
-                    epsed = "0.000000"
-                else:
-                    delta = time_offset(plf.datetime, tlast)
-                    epsed = time_offset(plf.datetime, t0)
-                tlast = plf.datetime
-                rid = plf.router.iname
-                peerconnid = "%s" % comn.conn_peers_connid.get(plf.data.conn_id, "")
-                peer = plf.router.conn_peer_display.get(plf.data.conn_id, "")  # peer container
id
-                print("<tr><td>%s</td> <td>%s</td> <td>%s</td>
<td>%s</td> <td>%s</td> <td>%s</td> "
-                      "<td>%s</td> <td>%s</td> <td>%s</td></tr>"
%
-                      (plf.adverbl_link_to(), plf.datetime, rid, plf.data.conn_id, plf.data.direction,
peerconnid, peer,
-                       delta, epsed))
+        for plf in comn.shorteners.short_link_names.customers(sname):
+            if t0 is None:
+                t0 = plf.datetime
+                delta = "0.000000"
+                epsed = "0.000000"
+            else:
+                delta = time_offset(plf.datetime, tlast)
+                epsed = time_offset(plf.datetime, t0)
+            tlast = plf.datetime
+            rid = plf.router.iname
+            peerconnid = "%s" % comn.conn_peers_connid.get(plf.data.conn_id, "")
+            peer = plf.router.conn_peer_display.get(plf.data.conn_id, "")  # peer container
id
+            print("<tr><td>%s</td> <td>%s</td> <td>%s</td>
<td>%s</td> <td>%s</td> <td>%s</td> "
+                  "<td>%s</td> <td>%s</td> <td>%s</td></tr>"
%
+                  (plf.adverbl_link_to(), plf.datetime, rid, plf.data.conn_id, plf.data.direction,
peerconnid, peer,
+                   delta, epsed))
         print("</table>")
 
     print("<hr>")


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


Mime
View raw message