Skip to content

benchmarking/nighthawk_common: compute stage rates from exact duration - #88

Open
ygao-g wants to merge 1 commit into
nighthawk-common-extractfrom
nighthawk-ingress-rates
Open

ygao-g wants to merge 1 commit into
nighthawk-common-extractfrom
nighthawk-ingress-rates

Conversation

@ygao-g

@ygao-g ygao-g commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Nighthawk divides achieved-rps and send-rate by a stage duration that it rounds down to whole seconds. When a stage ran a fraction of a second longer than its nominal length, both values were too high. The error was up to 10% on a 10 s stage. slo_max_rps comes from achieved_rps, so the reported capacity was too high as well.

The benchmark output now computes achieved_rps and send_rate from the exact stage duration. Nighthawk's own values stay in stats.jsonl under the *_cpp keys. The stage verdicts are still Nighthawk's and do not change. The nighthawk-ingress README states how much too high the results from before this change can be. Each stage row also records the connection wait time, the sequencer blocking time and the standard deviation of the latency. With these values, a reader can tell a stall in the load client from latency in the system under test.

Part of agent-substrate#3624

AI use: AI-assisted for the diff, the split and the test runs; I reviewed the diff.

  • Tests pass
  • Docs updated

@ygao-g ygao-g self-assigned this Nov 6, 2026
@ygao-g
ygao-g force-pushed the nighthawk-ingress-rates branch 3 times, most recently from 3f71a82 to 24847c9 Compare November 6, 2026 19:09
Nighthawk divides achieved-rps and send-rate by execution_duration
truncated to whole seconds, so a stage that overran its nominal length
by a fraction of a second read high, by up to 1/N for an N-second
stage. stage_rows() now computes both from the exact duration and keeps
Nighthawk's values under the *_cpp keys. Stage verdicts come from
Nighthawk's threshold scores and do not change. The nighthawk-ingress
README notes how far runs recorded before this change read high.

Each stage row also records the queue_to_connect and sequencer.blocking
statistics and the latency pstdev, so a client-side stall can be told
apart from gateway latency. The tests for the new behavior live in
benchmarking/nighthawk_common/tests; the ingress suite is unchanged.

Signed-off-by: Yuan Gao <ypgao@google.com>
@ygao-g
ygao-g force-pushed the nighthawk-ingress-rates branch from 24847c9 to af0a3db Compare November 9, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant