wasphin opened a new pull request, #3582:
URL: https://github.com/apache/brpc/pull/3582

   ### 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:
   
   - Add `RecorderTest.latency_recorder_window_statistics` and a test helper
     that exposes the existing protected window snapshot interface.
   - Record 1, 2, and 3, wait for that batch to be sampled, then record 4
     through 7 to exercise aggregation across sampler ticks.
   - Use a ten-second window with a five-second total wait budget. Confirm
     the full snapshot contains seven observations before checking sum 28
     and average 4, and independently observe and save maximum latency 7.
   - Leave production code and existing tests unchanged.
   
   Side effects:
   - Performance effects: The new test normally waits for two sampling
     cycles and has a five-second polling budget.
   - Breaking backward compatibility: None; test-only addition.
   
   ---
   ### Check List:
   - Built with CMake on macOS and ran the new test 20 times; all passed.
   - `git diff --check` passed.
   - The change adds focused unit-test coverage for existing behavior.
   - Please follow [Contributor Covenant Code of 
Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to