wasphin opened a new pull request, #3581: URL: https://github.com/apache/brpc/pull/3581
### What problem does this PR solve? Issue Number: N/A Problem Summary: `MultiDimensionTest.mlatencyrecorder` can fail when its one-second sleep ends before the asynchronous sampler updates the latency windows. The Bazel CI job below observed latency 0 instead of 4: https://github.com/apache/brpc/actions/runs/37211025654/job/111462085596 The QPS assertion also assumes that seven recorded requests yield at least seven requests per second, although QPS depends on the actual sampling interval and randomized rounding. ### What is changed and the side effects? Changed: - Poll both latency windows until samples are available, with a documented five-second deadline to tolerate scheduling delays on busy CI runners. - Check positive QPS instead of assuming a minimum rate of seven. - Keep the fatal pointer assertion and use nonfatal assertions for independent metric checks. - Restore modified flags automatically with `FlagSaver`, including when a fatal assertion returns from the test. Side effects: - Performance effects: The test stops waiting once both windows have samples; delayed or failed sampling can extend the wait to five seconds. - Breaking backward compatibility: None; this change affects only a test. --- ### Check List: - The changed test source compiled with Bazel on macOS. Linking the test binary was blocked by unresolved `bthread_*` symbols, so runtime tests could not execute. The existing CMake configuration also referenced a missing Google Test source directory. GitHub Actions will report tests. - This fixes an existing test and adds no production behavior. - The change follows the repository's Code of Conduct. -- 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]
