Skip to content

Commit

Permalink
exclude retries from lag accumulation
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva committed Nov 29, 2024
1 parent 6056c95 commit 7c5f470
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sarracenia/flowcb/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,10 @@ def after_accept(self, worklist):
for msg in worklist.incoming:

lag = now - timestr2flt(msg['pubTime'])
self.lagTotal += lag
if lag > self.lagMax:
self.lagMax = lag
if not ( '_isRetry' in msg and msg['_isRetry']):
self.lagTotal += lag
if lag > self.lagMax:
self.lagMax = lag
if set(['after_accept']) & self.o.logEvents:
logger.info( f"accepted: (lag: {lag:.2f} ) {self._messageAcceptStr(msg)}" )

Expand Down

0 comments on commit 7c5f470

Please sign in to comment.