Skip to content

fix(handler): drain channels after timeout to capture final measurement#49

Open
robertodauria wants to merge 1 commit intomainfrom
fix-drain-final-measurement
Open

fix(handler): drain channels after timeout to capture final measurement#49
robertodauria wants to merge 1 commit intomainfrom
fix-drain-final-measurement

Conversation

@robertodauria
Copy link
Contributor

@robertodauria robertodauria commented Feb 27, 2026

Summary

  • Add a 500ms drain loop after timeout.Done() to collect any remaining in-flight measurements from senderCh/receiverCh before returning
  • The sender goroutine sends a final Measure() on ctx.Done() which could be missed when the handler returned immediately on timeout
  • This fixes a ~310ms gap in ElapsedTime for all MSAK tests compared to ndt7

This change is Reviewable

@robertodauria robertodauria force-pushed the fix-drain-final-measurement branch from eeb000a to 95937d4 Compare February 27, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant