Repository navigation
Honor --rate for replays without session timestamps - #405
Merged
Merged
Conversation
When --rate was given for a replay whose sessions carry no start-time nodes, the client computed a per session sleep time but stored it in a variable that shadowed the one the dispatch loop reads. The loop therefore slept 0us between sessions, so --rate had no effect for such replays, and the startup log reported a 0 ms per session sleep time. This patch addresses this by assigning the computed sleep time, still capped by --sleep-limit, to the variable the dispatch loop uses. This change also adds a Uranium regression test that replays several timestamp-less sessions at a low rate and verifies both the logged sleep time and that the replay takes at least the expected duration. Co-authored-by: Claude Opus 5.5 (Low reasoning) <[email protected]>
bneradt
commented
Oct 13, 2026
Comment on lines
-1093
to
-1094
| auto sleep_time = microseconds(sleep_time_raw); | ||
| sleep_time = std::min(sleep_time, sleep_limit); |
Collaborator
Author
There was a problem hiding this comment.
Not that the auto sleep_time here accidentally shadowed the outer scope sleep_time we were trying to set.
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.
When --rate was given for a replay whose sessions carry no start-time
nodes, the client computed a per session sleep time but stored it in a
variable that shadowed the one the dispatch loop reads. The loop
therefore slept 0us between sessions, so --rate had no effect for such
replays, and the startup log reported a 0 ms per session sleep time.
This patch addresses this by assigning the computed sleep time, still
capped by --sleep-limit, to the variable the dispatch loop uses. This
change also adds a Uranium regression test that replays several
timestamp-less sessions at a low rate and verifies both the logged
sleep time and that the replay takes at least the expected duration.
Co-authored-by: Claude Opus 5.5 (Low reasoning) [email protected]
🤖 Generated with Claude Code