You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2020/05/13 18:26:08 UTC

[qpid-dispatch] branch master updated (807ca7f -> 04e6950)

This is an automated email from the ASF dual-hosted git repository.

chug pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git.


    from 807ca7f  DISPATCH-1650: fix flaky test_01_parallel_link_routes
     new 8aaba2a  [NO-JIRA] Scraper - add description of performative detail decorations
     new 04e6950  [NO-JIRA] Scraper - add timestamp switch to sequence diagram generator

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 tools/scraper/README.md       | 17 +++++++++++++++++
 tools/scraper/seq-diag-gen.py | 22 ++++++++++++++++------
 2 files changed, 33 insertions(+), 6 deletions(-)


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


[qpid-dispatch] 02/02: [NO-JIRA] Scraper - add timestamp switch to sequence diagram generator

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git

commit 04e69505d54b0c14ea7950c070c1af185df07b7d
Author: Chuck Rolke <ch...@apache.org>
AuthorDate: Wed May 13 14:25:06 2020 -0400

    [NO-JIRA] Scraper - add timestamp switch to sequence diagram generator
---
 tools/scraper/seq-diag-gen.py | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/tools/scraper/seq-diag-gen.py b/tools/scraper/seq-diag-gen.py
index 7313f8e..1c7f8f4 100755
--- a/tools/scraper/seq-diag-gen.py
+++ b/tools/scraper/seq-diag-gen.py
@@ -46,6 +46,7 @@ class log_record:
         # print("DEBUG input line: ", index, line)
         dateandtime, name_left, direction, name_right, perf, router_line = line.split('|')
         self.dateandtime = dateandtime.strip()
+        self.time = self.dateandtime.split(' ')[1]
         self.index = index
         self.name_left = name_left.strip()
         self.direction = direction.strip()
@@ -77,25 +78,31 @@ class log_record:
         peer_rec.peer_log_rec = self
         return True
 
-    def show_for_sdorg(self):
+    def show_for_sdorg(self, showtime):
         # A single sd.org vector consumes one or two log lines.
         #  One if from an external actor.
         #  Two if a message goes between routers.
         # Leave space where the message is supposed to land in the receiving routers
         if self.peer_log_rec is None:
-            print("%s->%s:%s" % (self.sentby, self.rcvdby, self.performative))
+            if showtime:
+                print("%s->%s:%s %s" % (self.sentby, self.rcvdby, self.time, self.performative))
+            else:
+                print("%s->%s:%s" % (self.sentby, self.rcvdby, self.performative))
         else:
             if self.peer_log_rec.index > self.index:
                 linediff = int(self.peer_log_rec.index) - int(self.index)
                 space = -MAGIC_SPACE_NUMBER * (linediff - 1)
-                print("%s->(%s)%s:%s" %(self.sentby, str(linediff), self.rcvdby, self.performative))
+                if showtime:
+                    print("%s->(%s)%s:%s %s" %(self.sentby, str(linediff), self.rcvdby, self.time, self.performative))
+                else:
+                    print("%s->(%s)%s:%s" % (self.sentby, str(linediff), self.rcvdby, self.performative))
                 print("space %s" % (str(space)))
             else:
                 print("space %d" % MAGIC_SPACE_NUMBER)
 
     def diag_dump(self):
-        cmn = ("index: %d, sentby: %s, rcvdby: %s, performative: %s, router_line: %s" %
-               (self.index, self.sentby, self.rcvdby, self.performative, self.router_line))
+        cmn = ("index: %d, dateandtime: %s, sentby: %s, rcvdby: %s, performative: %s, router_line: %s" %
+               (self.dateandtime, self.index, self.sentby, self.rcvdby, self.performative, self.router_line))
         if self.peer_log_rec is None:
             print(cmn)
         else:
@@ -134,6 +141,9 @@ if __name__ == "__main__":
     parser = optparse.OptionParser(usage="%prog [options]",
                                    description="cooks a scraper log snippet into sequencediagram.org source")
     parser.add_option("-f", "--filename", action="append", help="logfile to use or - for stdin")
+    parser.add_option('--timestamp', '-t',
+                      action='store_true',
+                      help='Include HH:MM:SS.ssssss in output')
 
     (opts, args) = parser.parse_args()
     if not opts.filename:
@@ -153,7 +163,7 @@ if __name__ == "__main__":
 
             # process the list of records
             for log_rec in log_recs:
-                log_rec.show_for_sdorg()
+                log_rec.show_for_sdorg(opts.timestamp)
 
             # diag dump
             #print("\nDiag dump")


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


[qpid-dispatch] 01/02: [NO-JIRA] Scraper - add description of performative detail decorations

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git

commit 8aaba2a8127ca91519a7b4e744b9457a4aebacbe
Author: Chuck Rolke <ch...@apache.org>
AuthorDate: Wed May 13 14:23:48 2020 -0400

    [NO-JIRA] Scraper - add description of performative detail decorations
---
 tools/scraper/README.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tools/scraper/README.md b/tools/scraper/README.md
index f5fde0a..be68d84 100644
--- a/tools/scraper/README.md
+++ b/tools/scraper/README.md
@@ -156,6 +156,23 @@ and divides the connection data. Connection names inclued the router instance ID
 * AMQP Addresses from every every AMQP Attach are indexed. A table for each address
   shows when the address was referenced and some connection details.
 
+## AMQP performative legend
+
+Scraper decorates performative display lines with important AMQP values. 
+
+| Performative | Decorations                 |
+|--------------|-----------------------------|
+| open         | [0]                         |
+| close        | [0]                         |
+| begin        | [channel, remoteChannel]    |
+| end          | [channel]                   |
+| attach       | [channel, handle] role linkName (source: src, target: tgt) |
+| detach       | [channel, handle]           |
+| flow         | [channel, handle] (deliveryCount, linkCredit) |
+| transfer     | [channel, handle] (deliveryId) .. [flags] length (settement state)      |
+| disposition  | [channel] (role firstId-lastId settleFlags settleState) |
+ 
+
 ## Sequence generator
 
 The sequence generator (switches --sequence or -sq) generates some extra output that is


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