Repository navigation
Report actual WAIT latency in JSON summaries - #805
Merged
Merged
Conversation
This was referenced Oct 23, 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
Built-in WAIT operations have real latency samples, but their JSON
Latency,Average LatencyandAccumulated Latencyare always zero. A reproduced run has7 WAIT operations, a97.60914ms text mean and80.384–100.863ms JSON min/max while all three summary fields are zero. Aggregate Totals accumulated latency also omits WAIT because it sums the serialized command rows.Root cause
The
Waitscall toresult_print_to_json()supplies literal zeros for the latency and accumulated latency arguments. The counters and WAIT histogram already contain the actual data.Fix
Pass
m_wait_cmd.m_latencyandm_wait_cmd.m_total_latencythrough the existing writer and aggregaterow_latency()helper. Real runs expose their measured values; aggregate accumulated latency keeps the existing rounded per-run convention, and Totals remains the sum of its rows. Empty WAIT rows remain zero. No keys, types, execution behavior, counters, rates, text output or HDR data change.This is independent of#804/#671's sample-weighted aggregate calculation. It uses the current aggregate mean, and composes with that correction without changing either scope.
Tests
Affected versions
Introduced by
d6bc71fdb1fa7a71f85c9b6fc0e9541ff4f36d7c(#273), which replaced the HDR-derived mean with a passed latency and introduced accumulated latency, but supplied zeros for WAIT. Its parent calculated the mean from the WAIT histogram.git tag --containslists 2.1.2–2.5.2, plus current master. Historical release attribution is from source/tag history; historical binaries were not executed.Release note — Bug Fixes
Correct built-in WAIT latency and accumulated latency in JSON summaries, including WAIT's contribution to aggregate Totals accumulated latency. Previously these populated WAIT fields were zero. Empty WAIT rows and all JSON keys/types are unchanged.
Fixes #803.
🤖 Generated with Claude Code