This is an automated email from the ASF dual-hosted git repository. chug pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/main by this push: new 04c1001 DISPATCH-2090: [tools] Scraper handles non-terminal dispositions 04c1001 is described below commit 04c10019bd69427ef70566087ec2f1bb945ffc86 Author: Chuck Rolke <c...@apache.org> AuthorDate: Wed Apr 28 10:18:49 2021 -0400 DISPATCH-2090: [tools] Scraper handles non-terminal dispositions Non-terminal dispositions were added to effect TCP adaptor flow control in the 1.16 release. Scraper needs adjustments to handle them. * Report negative disposition delta times as 0 seconds * Allow non-terminal dispositions to be overwritten without logging an error --- tools/scraper/amqp_detail.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/scraper/amqp_detail.py b/tools/scraper/amqp_detail.py index 8a2de9b..0b2c3cd 100755 --- a/tools/scraper/amqp_detail.py +++ b/tools/scraper/amqp_detail.py @@ -449,6 +449,9 @@ class AllDetails(): :param t0: :return: """ + if ttest < t0: + # Never return negative deltas + return "0.000000" delta = ttest - t0 t = float(delta.seconds) + float(delta.microseconds) / 1000000.0 return "%0.06f" % t @@ -681,8 +684,18 @@ class AllDetails(): for sdid in range(int(splf.data.first), (int(splf.data.last) + 1)): did = str(sdid) if did in sdispmap: - sys.stderr.write("ERROR: Delivery ID collision in disposition map. connid:%s, \n" % - (splf.data.conn_id)) + old_splf = sdispmap[did] + if "state=@received" in old_splf.line: + # Existing disposition is non-terminal. + # Don't complain when it is overwritten by another non-terminal + # or by a terminal disposition. + pass + else: + # Current state is terminal disposition. Complain when overwritten. + sys.stderr.write("ERROR: Delivery ID collision in disposition map. connid:%s, \n" % + (splf.data.conn_id)) + sys.stderr.write(" old: %s, %s\n" % (old_splf.fid, old_splf.line)) + sys.stderr.write(" new: %s, %s\n" % (splf.fid, splf.line)) sdispmap[did] = splf def rollup_disposition_counts(self, state, conn, sess, link): --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org