Skip to content

bench: don't time simulator teardown - #4411

Open
larseggert wants to merge 1 commit into
mainfrom
bench-sim-run-ref
Open

larseggert wants to merge 1 commit into
mainfrom
bench-sim-run-ref

Conversation

@larseggert

Copy link
Copy Markdown
Collaborator

ReadySimulator::run takes &mut self, so iter_batched_ref drops the simulator outside the timed region.

@larseggert
larseggert marked this pull request as ready for review November 23, 2026 15:20
Copilot AI balanced review requested due to automatic review settings November 23, 2026 15:20
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.62%. Comparing base (6ae0599) to head (5edd4dd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4411   +/-   ##
=======================================
  Coverage   96.61%   96.62%           
=======================================
  Files         118      118           
  Lines       43894    43894           
  Branches    43894    43894           
=======================================
+ Hits        42410    42412    +2     
+ Misses       1463     1461    -2     
  Partials       21       21           
Flag Coverage Δ
freebsd 94.12% <ø> (+10.33%) ⬆️
linux 96.77% <ø> (-0.01%) ⬇️
macos 94.50% <ø> (-0.01%) ⬇️
windows 94.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
neqo-common 99.33% <ø> (+0.04%) ⬆️
neqo-http3 96.00% <ø> (ø)
neqo-qpack 96.55% <ø> (ø)
neqo-transport 97.13% <ø> (ø)
neqo-udp 87.63% <ø> (ø)
mtu 91.31% <ø> (ø)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the benchmark-timing changes.

No open issues 🎉

What changed in this PR

This PR excludes simulator teardown from QUIC and HTTP/3 benchmark timing so measurements focus on simulation execution.

Changes:

  • Change ReadySimulator::run to borrow the simulator mutably rather than consume it.
  • Use iter_batched_ref in both benchmark suites, moving simulator destruction outside the timed region.
File Description
test-fixture/​src/​sim/​mod.rs Make run take &mut self, preserving the simulator after execution.
neqo-transport/​benches/​transfer_common.rs Exclude simulator teardown from transport benchmark timing.
neqo-http3/​benches/​common.rs Exclude simulator teardown from HTTP/3 benchmark timing.

Review effort: Balanced

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings.

@github-actions

Copy link
Copy Markdown
Contributor

Failed Interop Tests

QUIC Interop Runner, client vs. server, differences relative to main at c46d346.

neqo-pr as clientneqo-pr as server
neqo-pr vs. aioquic: run cancelled after 20 min
neqo-pr vs. go-x-net: run cancelled after 20 min
neqo-pr vs. haproxy: baseline result missing
neqo-pr vs. kwik: run cancelled after 20 min
neqo-pr vs. linuxquic: run cancelled after 20 min
neqo-pr vs. lsquic: run cancelled after 20 min
neqo-pr vs. msquic: run cancelled after 20 min
neqo-pr vs. mvfst: H DC LR C20 M S R Z 3 B U E A L1 L2 C1 C2 6 V2 BP BA CM
neqo-pr vs. neqo: A
neqo-pr vs. nginx: run cancelled after 20 min
neqo-pr vs. ngtcp2: run cancelled after 20 min
neqo-pr vs. picoquic: run cancelled after 20 min
neqo-pr vs. quic-go: baseline result missing
neqo-pr vs. quic-zig: baseline result missing
neqo-pr vs. quiche: BP BA
neqo-pr vs. quinn: run cancelled after 20 min
neqo-pr vs. s2n-quic: run cancelled after 20 min
neqo-pr vs. tquic: run cancelled after 20 min
neqo-pr vs. xquic: Z A L1 ⚠️C1
aioquic vs. neqo-pr: baseline result missing
go-x-net vs. neqo-pr: CM
kwik vs. neqo-pr: run cancelled after 20 min
msquic vs. neqo-pr: baseline result missing
mvfst vs. neqo-pr: baseline result missing
neqo vs. neqo-pr: baseline result missing
ngtcp2 vs. neqo-pr: run cancelled after 20 min
openssl vs. neqo-pr: run cancelled after 20 min
picoquic vs. neqo-pr: run cancelled after 20 min
quic-go vs. neqo-pr: CM
quic-zig vs. neqo-pr: ⚠️C1 CM
quiche vs. neqo-pr: run cancelled after 20 min
quinn vs. neqo-pr: 🚀L1 V2 CM
s2n-quic vs. neqo-pr: ⚠️C2 CM
tquic vs. neqo-pr: CM
xquic vs. neqo-pr: run cancelled after 20 min
All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

@github-actions

Copy link
Copy Markdown
Contributor

Client/server transfer results

Performance differences relative to c46d346.

Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.

Client vs. server Mean±σ Min–Max Median±MAD MiB/s±σ ΔMedian
google-neqo-cubic 79.7 ± 0.5 78.5 – 80.7 79.7 ± 0.5 401.4 ± 2.4 💔 +1.0 (+1.2%)

Table above only shows statistically significant changes. See all results below.

All results

Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.

Client vs. server Mean±σ Min–Max Median±MAD MiB/s±σ ΔMedian
google-google 156.5 ± 0.5 155.2 – 157.5 156.4 ± 0.4 204.5 ± 0.6
google-neqo-cubic 79.7 ± 0.5 78.5 – 80.7 79.7 ± 0.5 401.4 ± 2.4 💔 +1.0 (+1.2%)
neqo-google-cubic ⚠️ 240.3 ± 40.9 205.9 – 327.9 209.2 ± 3.8 133.2 ± 22.7 -1.3 (-0.6%)
neqo-neqo-cubic 23.9 ± 0.2 23.5 – 24.2 23.9 ± 0.2 1338.9 ± 9.2 -0.1 (-0.3%)
neqo-neqo-cubic-nopacing 23.3 ± 0.1 23.1 – 23.9 23.3 ± 0.1 1370.7 ± 7.7 -0.0 (-0.1%)
neqo-neqo-newreno 23.9 ± 0.2 23.5 – 24.2 23.9 ± 0.2 1339.0 ± 8.8 +0.0 (+0.1%)
neqo-neqo-newreno-nopacing 23.3 ± 0.1 23.1 – 23.7 23.3 ± 0.1 1370.6 ± 6.5 -0.2 (-0.7%)
neqo-quiche-cubic 35.1 ± 0.3 34.6 – 35.9 35.1 ± 0.3 910.4 ± 8.1 -0.0 (-0.0%)
neqo-s2n-cubic 46.0 ± 0.3 45.4 – 46.7 46.0 ± 0.3 695.5 ± 4.1 -0.1 (-0.2%)
quiche-neqo-cubic 36.6 ± 0.4 35.6 – 37.8 36.6 ± 0.4 873.9 ± 10.7 +0.0 (+0.1%)
quiche-quiche 42.7 ± 0.2 42.1 – 43.4 42.7 ± 0.2 748.7 ± 4.0
s2n-neqo-cubic 126.9 ± 0.7 125.0 – 128.4 126.9 ± 0.6 252.2 ± 1.4 +0.0 (+0.0%)
s2n-s2n ⚠️ 175.4 ± 24.1 148.5 – 269.9 171.4 ± 1.2 182.4 ± 25.0

Download data for profiler.firefox.com or download performance comparison data.

@codspeed

codspeed Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will regress 7 benchmarks

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚡ 5 improved benchmarks
❌ 7 regressed benchmarks
✅ 89 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime walltime/pacing-true/varying-seeds 3.8 ms 4 ms -6.84%
❌ Walltime walltime/pacing-false/varying-seeds 3.3 ms 3.5 ms -6.13%
❌ Walltime walltime/pacing-false/same-seed 3.4 ms 3.6 ms -4.83%
❌ CPU Simulation simulated/pacing-true/varying-seeds 72.7 ms 75.9 ms -4.23%
❌ Walltime neqo-neqo-cubic 25.5 ms 26.3 ms -3.27%
❌ Walltime quiche-neqo 47 ms 48.5 ms -3.23%
❌ Walltime walltime/pacing-true/same-seed 4 ms 4.1 ms -2.17%
⚡ CPU Simulation simulated/1-streams/each-1000-bytes 2.1 ms 1.6 ms +28.1%
⚡ Walltime walltime/1-streams/each-1000-bytes 161.7 µs 131.6 µs +22.87%
⚡ CPU Simulation simulated/pacing-true/same-seed 76 ms 71.6 ms +6.22%
⚡ CPU Simulation simulated/pacing-false/same-seed 82.4 ms 79.1 ms +4.18%
⚡ Walltime neqo-s2n 59.8 ms 58.1 ms +3.03%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing bench-sim-run-ref (5edd4dd) with main (c46d346)

Open in CodSpeed

This branch has not been deployed

No deployments
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.

2 participants