Repository navigation
Cap late interrupted timed runs at the configured deadline - #789
Merged
fcostaoliveira merged 3 commits intoOct 23, 2026
Merged
Conversation
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Interrupting a timed workload while its last reply is stalled charges the drain wait to its reported duration. With 20 completed operations,
--test-time=1interrupted after about 3.2 seconds reports 3,196 ms and 6.26 ops/sec instead of 1,000 ms and 20 ops/sec.Root cause
The post-join interrupt finalizer uses the captured interrupt timestamp without the upper deadline bound applied by normal timed finalization.
Fix
Cap an already-started timed client's interrupt timestamp at its statistics start plus
--test-time. Preserve the existing lower bound and already-finalized guard. Early interrupts, request-count runs, never-started clients, and staircase's shared start retain their semantics. Compare elapsed microseconds before constructing the deadline so very large accepted durations cannot overflow Winsock's 32-bit seconds during early interruption. A late interrupt still reportsInterrupted: true: the user stopped the drain.Tests
9ddccaac1136c41e91342a590f0eaceeddde818d, late interrupts of both one- and two-second tests report 3,196 ms / 6.26 ops/sec. With this change they report 1,000 ms / 20 ops/sec and 2,000 ms / 10 ops/sec. All exit 0 with count 20.Interrupted: false.UINT_MAXtest time.make checktests pass; formatting and whitespace checks pass. POSIX signal integration tests skip Windows; the deterministic C++ timestamp cases run on all platforms.Affected versions
Introduced by
aa9edb8c01f74e6b67fef35a84e786fdcddf4c2f(#325), first released in 2.3.0. Affects 2.3.0 through 2.5.2 and current master before this fix.Fixes #747.
🤖 Generated with Claude Code