This is an automated email from the ASF dual-hosted git repository.
chenBright pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 11a404bbb Widen timed-boundary bounds in benchmark_fb smoke for CI
jitter (#3732)
11a404bbb is described below
commit 11a404bbb4946d99abf9cf9a32477bbe12fbfc99
Author: randomkang <[email protected]>
AuthorDate: Wed Nov 11 19:07:53 2026 +0800
Widen timed-boundary bounds in benchmark_fb smoke for CI jitter (#3732)
The benchmark_fb_smoke timed-boundary assertions were too tight for
shared GitHub runners. Two consecutive CI runs on macOS both failed
with different assertions tripped by the same cause: scheduling and
I/O jitter adds ~150 ms on top of the 600 ms server-side delay, so a
single call takes ~750 ms end-to-end.
- Run 1: seconds=2.2 hit the exclusive upper bound (was < 2.2).
- Run 2: seconds=2.1 passed, but p50_us=750474 exceeded 700000.
Widen the bounds while keeping the intent:
- seconds: < 2.6 still rejects a window stretched by a whole extra
call (~3.4 s) but tolerates one jittered in-flight call.
- latency upper bound: use the request timeout (5 s, matching
--timeout_ms=5000) instead of a fixed 700 ms; keep the 600 ms
floor (the server-side delay always applies) and the p50<=max
histogram ordering check.
---
example/benchmark_fb/smoke.py | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/example/benchmark_fb/smoke.py b/example/benchmark_fb/smoke.py
index 30e8119d1..676b83786 100644
--- a/example/benchmark_fb/smoke.py
+++ b/example/benchmark_fb/smoke.py
@@ -111,11 +111,19 @@ def run_timed_boundary(binary, endpoint, deadline):
raise RuntimeError("invalid timed summary: " + result.stdout) from
error
if report.get("failures") != 0 or report.get("requests", 0) < 1:
raise RuntimeError("unexpected timed result: " + result.stdout)
- if not 1.9 <= report.get("seconds", 0) < 2.2:
+ # The window must not be stretched by the in-flight call that ends after
+ # the deadline, but shared CI runners add substantial scheduling jitter
+ # on top of the 600 ms server delay (observed ~750 ms end-to-end), so the
+ # upper bound leaves enough room for one jittered in-flight call without
+ # accepting a window stretched by a whole extra call.
+ if not 1.9 <= report.get("seconds", 0) < 2.6:
raise RuntimeError("timed window includes in-flight calls: " +
result.stdout)
- # Every reply takes at least 600 ms; the latency histogram reports
- # percentiles at most 1/128 above the recorded value.
- if not 600000 <= report.get("p50_us", 0) <= report.get("max_us", 0) <
700000:
+ # Every reply takes at least 600 ms of server-side delay; runner
+ # scheduling and I/O jitter add on top of it, so bound the observed
+ # latency from above by the request timeout (5 s) instead of a fixed
+ # 700 ms that shared runners regularly exceed. The percentiles only
+ # check the relative histogram contract here.
+ if not 600000 <= report.get("p50_us", 0) <= report.get("max_us", 0) <
5000000:
raise RuntimeError("unexpected timed latency: " + result.stdout)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]