Repository navigation
Add latency recorder window statistics test - #3582
Merged
Merged
Conversation
Exercise latency observations split across sampler ticks using a window longer than the bounded wait budget. Confirm the sampled count is complete before checking the sum and average from the saved snapshot, and verify the maximum through its independent sampler.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The test is bounded, correctly validates complete window aggregation, and introduces no production changes.
Review effort: Balanced
Findings: None
What changed in this PR
Adds focused coverage for LatencyRecorder window aggregation across multiple sampler ticks.
Changes:
- Adds a helper exposing latency-window snapshots.
- Verifies complete count, sum, average, and maximum latency across two sampled batches.
| File | Description |
|---|---|
test/bvar_recorder_unittest.cpp |
Adds multi-tick latency window statistics coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
What problem does this PR solve?
Issue Number: N/A
Problem Summary:
A nonzero sampled latency does not prove that a window contains every
recorded observation. Add focused coverage for complete latency recorder
window statistics when writes span multiple sampler ticks.
What is changed and the side effects?
Changed:
RecorderTest.latency_recorder_window_statisticsand a test helperthat exposes the existing protected window snapshot interface.
through 7 to exercise aggregation across sampler ticks.
the full snapshot contains seven observations before checking sum 28
and average 4, and independently observe and save maximum latency 7.
Side effects:
cycles and has a five-second polling budget.
Check List:
git diff --checkpassed.