Skip to content

feat: Add loss trigger data to qlog#3430

Merged
larseggert merged 1 commit into
mozilla:mainfrom
larseggert:feat-loss-trigger
Mar 13, 2026
Merged

feat: Add loss trigger data to qlog#3430
larseggert merged 1 commit into
mozilla:mainfrom
larseggert:feat-loss-trigger

Conversation

@larseggert
Copy link
Copy Markdown
Collaborator

And restructure the related data structures some.

Copilot AI review requested due to automatic review settings March 10, 2026 16:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds loss-trigger attribution to qlog packet_lost events by recording why a packet was declared lost in recovery, then emitting that information to qlog consumers.

Changes:

  • Introduce LossTrigger/LossInfo on sent::Packet and update loss bookkeeping to store loss time + trigger.
  • Update loss detection to pass the appropriate trigger (time threshold vs reordering threshold) when declaring packets lost.
  • Emit qlog PacketLost.trigger (including pto_expired handling) and update affected tests/callers.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
neqo-transport/src/recovery/sent.rs Adds LossTrigger/LossInfo, stores loss metadata on packets, and exposes it via loss_info().
neqo-transport/src/recovery/mod.rs Passes a concrete LossTrigger into declare_lost() based on the loss detection condition.
neqo-transport/src/qlog.rs Populates qlog PacketLost.trigger using PTO vs recorded loss trigger.
neqo-transport/src/cc/classic_cc.rs Updates tests to call the new declare_lost(now, trigger) signature.

Comment thread neqo-transport/src/qlog.rs Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.18%. Comparing base (46de5bb) to head (b528faa).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3430      +/-   ##
==========================================
- Coverage   94.28%   94.18%   -0.10%     
==========================================
  Files         125      129       +4     
  Lines       38436    38795     +359     
  Branches    38436    38795     +359     
==========================================
+ Hits        36241    36541     +300     
- Misses       1355     1404      +49     
- Partials      840      850      +10     
Flag Coverage Δ
freebsd 93.25% <100.00%> (-0.10%) ⬇️
linux 94.29% <100.00%> (+<0.01%) ⬆️
macos 94.17% <100.00%> (-0.01%) ⬇️
windows 94.28% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
neqo-common 98.49% <ø> (ø)
neqo-crypto 86.90% <ø> (ø)
neqo-http3 93.91% <ø> (ø)
neqo-qpack 94.81% <ø> (ø)
neqo-transport 95.24% <100.00%> (+<0.01%) ⬆️
neqo-udp 82.97% <ø> (ø)
mtu 86.61% <ø> (ø)

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 10, 2026

Merging this PR will degrade performance by 10.08%

⚡ 4 improved benchmarks
❌ 4 regressed benchmarks
✅ 43 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime neqo-google 1.7 s 1.6 s +3.97%
WallTime neqo-quiche 463.2 ms 477.8 ms -3.04%
WallTime 1-conn/1-100mb-req (aka. Upload) 586.8 ms 538.8 ms +8.9%
WallTime msquic-neqo 397.8 ms 418.9 ms -5.06%
WallTime neqo-neqo-cubic 287.2 ms 277 ms +3.68%
WallTime neqo-neqo-newreno 287.8 ms 275.7 ms +4.39%
Memory take_ranges 12.5 KB 13.9 KB -10.08%
Simulation take_ranges 29.7 µs 31.1 µs -4.63%

Comparing larseggert:feat-loss-trigger (b528faa) with main (46de5bb)

Open in CodSpeed

@larseggert larseggert force-pushed the feat-loss-trigger branch 2 times, most recently from cc23644 to b1112d2 Compare March 11, 2026 10:07
And restructure the related data structures some.
@larseggert larseggert enabled auto-merge March 13, 2026 06:39
@larseggert larseggert added this pull request to the merge queue Mar 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Failed Interop Tests

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

neqo-pr as clientneqo-pr as server
neqo-pr vs. go-x-net: BP BA
neqo-pr vs. haproxy: 🚀M BP BA
neqo-pr vs. kwik: BP BA
neqo-pr vs. lsquic: run cancelled after 20 min
neqo-pr vs. msquic: A L1 C1
neqo-pr vs. mvfst: A 🚀L1 C1 🚀BA
neqo-pr vs. neqo: Z A
neqo-pr vs. nginx: BP BA
neqo-pr vs. ngtcp2: CM
neqo-pr vs. picoquic: A 🚀BP BA
neqo-pr vs. quic-go: A
neqo-pr vs. quiche: BP BA
neqo-pr vs. s2n-quic: BA CM
neqo-pr vs. tquic: S BP BA
neqo-pr vs. xquic: A C1
aioquic vs. neqo-pr: Z CM
go-x-net vs. neqo-pr: CM
kwik vs. neqo-pr: Z BP BA CM
lsquic vs. neqo-pr: Z
msquic vs. neqo-pr: Z ⚠️BA CM
mvfst vs. neqo-pr: Z A L1 C1 CM
neqo vs. neqo-pr: Z A
openssl vs. neqo-pr: LR M A CM
picoquic vs. neqo-pr: Z CM
quic-go vs. neqo-pr: ⚠️Z CM
quiche vs. neqo-pr: Z 🚀C1 CM
quinn vs. neqo-pr: Z ⚠️L1 V2 CM
s2n-quic vs. neqo-pr: CM
tquic vs. neqo-pr: Z CM
xquic vs. neqo-pr: M CM
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

Merged via the queue into mozilla:main with commit 77a3f7a Mar 13, 2026
195 of 196 checks passed
@larseggert larseggert deleted the feat-loss-trigger branch March 13, 2026 07:05
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results

Significant performance differences relative to 46de5bb.

transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1504: 💚 Performance has improved by -2.5554%.
       time:   [279.16 ms 280.99 ms 282.86 ms]
       thrpt:  [35.353 Kelem/s 35.588 Kelem/s 35.822 Kelem/s]
change:
       time:   [-3.4765% -2.5554% -1.6572] (p = 0.00 < 0.05)
       thrpt:  [+1.6852% +2.6225% +3.6017]
       Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
sent::Packets::take_ranges: :broken_heart: Performance has regressed by +10.839%.
       time:   [5.0028 µs 5.1264 µs 5.2433 µs]
       change: [+7.0526% +10.839% +14.754] (p = 0.00 < 0.05)
       Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
All results
transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1504: Change within noise threshold.
       time:   [205.89 ms 206.38 ms 206.95 ms]
       thrpt:  [483.21 MiB/s 484.55 MiB/s 485.70 MiB/s]
change:
       time:   [+0.9113% +1.2855% +1.6483] (p = 0.00 < 0.05)
       thrpt:  [-1.6216% -1.2692% -0.9030]
       Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) high mild
2 (2.00%) high severe
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1504: 💚 Performance has improved by -2.5554%.
       time:   [279.16 ms 280.99 ms 282.86 ms]
       thrpt:  [35.353 Kelem/s 35.588 Kelem/s 35.822 Kelem/s]
change:
       time:   [-3.4765% -2.5554% -1.6572] (p = 0.00 < 0.05)
       thrpt:  [+1.6852% +2.6225% +3.6017]
       Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1504: No change in performance detected.
       time:   [38.593 ms 38.768 ms 38.961 ms]
       thrpt:  [25.666   B/s 25.795   B/s 25.911   B/s]
change:
       time:   [-0.7225% -0.0442% +0.6660] (p = 0.90 > 0.05)
       thrpt:  [-0.6616% +0.0442% +0.7278]
       No change in performance detected.
Found 10 outliers among 100 measurements (10.00%)
1 (1.00%) low mild
2 (2.00%) high mild
7 (7.00%) high severe
transfer/1-conn/1-100mb-req (aka. Upload)/mtu-1504: No change in performance detected.
       time:   [206.56 ms 206.97 ms 207.41 ms]
       thrpt:  [482.13 MiB/s 483.15 MiB/s 484.11 MiB/s]
change:
       time:   [-0.0234% +0.3512% +0.7010] (p = 0.06 > 0.05)
       thrpt:  [-0.6961% -0.3500% +0.0234]
       No change in performance detected.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) low mild
2 (2.00%) high severe
decode 4096 bytes, mask ff: No change in performance detected.
       time:   [5.5801 µs 5.5990 µs 5.6239 µs]
       change: [-0.0638% +0.3119% +0.7204] (p = 0.13 > 0.05)
       No change in performance detected.
Found 7 outliers among 100 measurements (7.00%)
4 (4.00%) high mild
3 (3.00%) high severe
decode 1048576 bytes, mask ff: Change within noise threshold.
       time:   [1.4282 ms 1.4329 ms 1.4401 ms]
       change: [+0.1179% +0.4954% +1.0419] (p = 0.02 < 0.05)
       Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severe
decode 4096 bytes, mask 7f: No change in performance detected.
       time:   [8.4612 µs 8.4729 µs 8.4846 µs]
       change: [-0.2382% +0.0035% +0.2558] (p = 0.98 > 0.05)
       No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) high mild
2 (2.00%) high severe
decode 1048576 bytes, mask 7f: No change in performance detected.
       time:   [2.1776 ms 2.1810 ms 2.1845 ms]
       change: [-0.1723% +0.0359% +0.2489] (p = 0.74 > 0.05)
       No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
decode 4096 bytes, mask 3f: No change in performance detected.
       time:   [6.9049 µs 6.9144 µs 6.9244 µs]
       change: [-0.2268% +0.0764% +0.4326] (p = 0.67 > 0.05)
       No change in performance detected.
Found 6 outliers among 100 measurements (6.00%)
3 (3.00%) high mild
3 (3.00%) high severe
decode 1048576 bytes, mask 3f: No change in performance detected.
       time:   [1.7659 ms 1.7686 ms 1.7716 ms]
       change: [-0.1457% +0.0736% +0.3026] (p = 0.52 > 0.05)
       No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
streams/simulated/1-streams/each-1000-bytes: No change in performance detected.
       time:   [129.68 ms 129.68 ms 129.69 ms]
       thrpt:  [7.5303 KiB/s 7.5305 KiB/s 7.5307 KiB/s]
change:
       time:   [-0.0027% +0.0010% +0.0050] (p = 0.59 > 0.05)
       thrpt:  [-0.0050% -0.0010% +0.0027]
       No change in performance detected.
streams/simulated/1000-streams/each-1-bytes: No change in performance detected.
       time:   [2.5362 s 2.5365 s 2.5368 s]
       thrpt:  [394.19   B/s 394.24   B/s 394.29   B/s]
change:
       time:   [-0.0212% -0.0041% +0.0125] (p = 0.64 > 0.05)
       thrpt:  [-0.0125% +0.0041% +0.0212]
       No change in performance detected.
streams/simulated/1000-streams/each-1000-bytes: No change in performance detected.
       time:   [6.5876 s 6.5959 s 6.6052 s]
       thrpt:  [147.85 KiB/s 148.06 KiB/s 148.24 KiB/s]
change:
       time:   [-0.0722% +0.0989% +0.2765] (p = 0.27 > 0.05)
       thrpt:  [-0.2757% -0.0988% +0.0722]
       No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
5 (5.00%) high severe
streams/walltime/1-streams/each-1000-bytes: No change in performance detected.
       time:   [586.41 µs 588.45 µs 590.96 µs]
       change: [-0.0663% +0.5015% +1.0956] (p = 0.09 > 0.05)
       No change in performance detected.
Found 7 outliers among 100 measurements (7.00%)
1 (1.00%) high mild
6 (6.00%) high severe
streams/walltime/1000-streams/each-1-bytes: Change within noise threshold.
       time:   [12.407 ms 12.426 ms 12.445 ms]
       change: [+0.5795% +0.7931% +1.0136] (p = 0.00 < 0.05)
       Change within noise threshold.
streams/walltime/1000-streams/each-1000-bytes: No change in performance detected.
       time:   [44.927 ms 45.010 ms 45.124 ms]
       change: [-0.1394% +0.1842% +0.5024] (p = 0.27 > 0.05)
       No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) low mild
1 (1.00%) high severe
coalesce_acked_from_zero 1+1 entries: No change in performance detected.
       time:   [92.673 ns 93.026 ns 93.387 ns]
       change: [-0.1652% +0.2100% +0.6242] (p = 0.30 > 0.05)
       No change in performance detected.
Found 13 outliers among 100 measurements (13.00%)
11 (11.00%) high mild
2 (2.00%) high severe
coalesce_acked_from_zero 3+1 entries: No change in performance detected.
       time:   [110.22 ns 110.78 ns 111.72 ns]
       change: [-0.7784% -0.0875% +0.7716] (p = 0.87 > 0.05)
       No change in performance detected.
Found 13 outliers among 100 measurements (13.00%)
3 (3.00%) low mild
5 (5.00%) high mild
5 (5.00%) high severe
coalesce_acked_from_zero 10+1 entries: No change in performance detected.
       time:   [110.11 ns 110.62 ns 111.22 ns]
       change: [-0.3138% +0.6436% +1.7411] (p = 0.25 > 0.05)
       No change in performance detected.
Found 14 outliers among 100 measurements (14.00%)
4 (4.00%) low mild
10 (10.00%) high severe
coalesce_acked_from_zero 1000+1 entries: No change in performance detected.
       time:   [94.250 ns 94.402 ns 94.573 ns]
       change: [-0.7021% -0.1566% +0.4489] (p = 0.61 > 0.05)
       No change in performance detected.
Found 6 outliers among 100 measurements (6.00%)
3 (3.00%) high mild
3 (3.00%) high severe
RxStreamOrderer::inbound_frame(): No change in performance detected.
       time:   [107.64 ms 107.73 ms 107.82 ms]
       change: [-0.1396% -0.0298% +0.0757] (p = 0.59 > 0.05)
       No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
sent::Packets::take_ranges: :broken_heart: Performance has regressed by +10.839%.
       time:   [5.0028 µs 5.1264 µs 5.2433 µs]
       change: [+7.0526% +10.839% +14.754] (p = 0.00 < 0.05)
       Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
transfer/simulated/pacing-false/varying-seeds: No change in performance detected.
       time:   [23.941 s 23.941 s 23.941 s]
       thrpt:  [171.09 KiB/s 171.09 KiB/s 171.09 KiB/s]
change:
       time:   [+0.0000% +0.0000% +0.0000] (p = NaN > 0.05)
       thrpt:  [+0.0000% +0.0000% +0.0000]
       No change in performance detected.
transfer/simulated/pacing-true/varying-seeds: No change in performance detected.
       time:   [23.676 s 23.676 s 23.676 s]
       thrpt:  [173.01 KiB/s 173.01 KiB/s 173.01 KiB/s]
change:
       time:   [+0.0000% +0.0000% +0.0000] (p = NaN > 0.05)
       thrpt:  [+0.0000% +0.0000% +0.0000]
       No change in performance detected.
transfer/simulated/pacing-false/same-seed: No change in performance detected.
       time:   [23.941 s 23.941 s 23.941 s]
       thrpt:  [171.09 KiB/s 171.09 KiB/s 171.09 KiB/s]
change:
       time:   [+0.0000% +0.0000% +0.0000] (p = NaN > 0.05)
       thrpt:  [+0.0000% +0.0000% +0.0000]
       No change in performance detected.
transfer/simulated/pacing-true/same-seed: No change in performance detected.
       time:   [23.676 s 23.676 s 23.676 s]
       thrpt:  [173.01 KiB/s 173.01 KiB/s 173.01 KiB/s]
change:
       time:   [+0.0000% +0.0000% +0.0000] (p = NaN > 0.05)
       thrpt:  [+0.0000% +0.0000% +0.0000]
       No change in performance detected.
transfer/walltime/pacing-false/varying-seeds: Change within noise threshold.
       time:   [22.942 ms 22.977 ms 23.033 ms]
       change: [-2.2073% -1.9872% -1.7212] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) low mild
1 (1.00%) high mild
1 (1.00%) high severe
transfer/walltime/pacing-true/varying-seeds: Change within noise threshold.
       time:   [23.317 ms 23.337 ms 23.358 ms]
       change: [-1.1412% -0.9825% -0.8427] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe
transfer/walltime/pacing-false/same-seed: Change within noise threshold.
       time:   [23.089 ms 23.111 ms 23.133 ms]
       change: [-0.8694% -0.6671% -0.5076] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
transfer/walltime/pacing-true/same-seed: No change in performance detected.
       time:   [23.637 ms 23.668 ms 23.712 ms]
       change: [-0.1174% +0.1235% +0.3710] (p = 0.35 > 0.05)
       No change in performance detected.
Found 8 outliers among 100 measurements (8.00%)
2 (2.00%) low mild
5 (5.00%) high mild
1 (1.00%) high severe

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

@github-actions
Copy link
Copy Markdown
Contributor

Client/server transfer results

Performance differences relative to 77a3f7a.

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

Client vs. server (params) Mean ± σ Min Max MiB/s ± σ Δ main Δ main
msquic-neqo-cubic 204.4 ± 61.4 154.5 509.5 156.6 ± 0.5 💚 -54.5 -21.1%
neqo-msquic-cubic 160.5 ± 4.1 153.8 167.6 199.4 ± 7.8 💔 1.2 0.7%
neqo-neqo-cubic 95.1 ± 3.7 90.3 106.5 336.5 ± 8.6 💚 -2.2 -2.3%
neqo-neqo-newreno 96.8 ± 4.1 89.7 105.5 330.5 ± 7.8 💚 -1.4 -1.5%
neqo-quiche-cubic 192.9 ± 4.2 186.1 207.3 165.9 ± 7.6 💔 1.3 0.7%
neqo-s2n-cubic 220.6 ± 4.9 211.4 237.9 145.1 ± 6.5 💔 3.6 1.6%
s2n-neqo-cubic 176.1 ± 5.5 163.9 186.6 181.7 ± 5.8 💔 1.6 0.9%

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 (params) Mean ± σ Min Max MiB/s ± σ Δ main Δ main
google-google-nopacing 464.2 ± 3.8 457.5 474.2 68.9 ± 8.4
google-neqo-cubic 275.9 ± 4.4 269.4 289.7 116.0 ± 7.3 0.8 0.3%
msquic-msquic-nopacing 244.5 ± 126.4 140.0 774.1 130.9 ± 0.3
msquic-neqo-cubic 204.4 ± 61.4 154.5 509.5 156.6 ± 0.5 💚 -54.5 -21.1%
neqo-google-cubic 771.0 ± 3.8 765.1 785.7 41.5 ± 8.4 -0.8 -0.1%
neqo-msquic-cubic 160.5 ± 4.1 153.8 167.6 199.4 ± 7.8 💔 1.2 0.7%
neqo-neqo-cubic 95.1 ± 3.7 90.3 106.5 336.5 ± 8.6 💚 -2.2 -2.3%
neqo-neqo-cubic-nopacing 97.0 ± 5.6 85.7 131.8 329.9 ± 5.7 -0.4 -0.4%
neqo-neqo-newreno 96.8 ± 4.1 89.7 105.5 330.5 ± 7.8 💚 -1.4 -1.5%
neqo-neqo-newreno-nopacing 96.3 ± 4.2 88.6 105.0 332.1 ± 7.6 -0.9 -0.9%
neqo-quiche-cubic 192.9 ± 4.2 186.1 207.3 165.9 ± 7.6 💔 1.3 0.7%
neqo-s2n-cubic 220.6 ± 4.9 211.4 237.9 145.1 ± 6.5 💔 3.6 1.6%
quiche-neqo-cubic 181.5 ± 5.3 172.6 194.6 176.3 ± 6.0 -1.0 -0.5%
quiche-quiche-nopacing 141.6 ± 4.2 134.8 153.3 226.0 ± 7.6
s2n-neqo-cubic 176.1 ± 5.5 163.9 186.6 181.7 ± 5.8 💔 1.6 0.9%
s2n-s2n-nopacing 243.5 ± 17.4 231.9 338.5 131.4 ± 1.8

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

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.

3 participants