Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Use strum macros #2440

Merged
merged 8 commits into from
Feb 14, 2025
Merged

chore: Use strum macros #2440

merged 8 commits into from
Feb 14, 2025

Conversation

larseggert
Copy link
Collaborator

And remove some boilerplate code.

Fixes #2439

And remove some boilerplate code.

Fixes mozilla#2439
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.38%. Comparing base (d247751) to head (f80a8b6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
neqo-crypto/src/auth.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2440      +/-   ##
==========================================
+ Coverage   95.26%   95.38%   +0.12%     
==========================================
  Files         115      115              
  Lines       37198    37039     -159     
  Branches    37198    37039     -159     
==========================================
- Hits        35436    35331     -105     
+ Misses       1756     1702      -54     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Feb 12, 2025

Failed Interop Tests

QUIC Interop Runner, client vs. server, differences relative to d247751.

neqo-latest as client

neqo-latest as server

All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

Copy link

github-actions bot commented Feb 12, 2025

Benchmark results

Performance differences relative to d247751.

decode 4096 bytes, mask ff: 💚 Performance has improved.
       time:   [10.865 µs 10.902 µs 10.945 µs]
       change: [-12.196% -11.825% -11.496%] (p = 0.00 < 0.05)

Found 11 outliers among 100 measurements (11.00%)
1 (1.00%) low severe
1 (1.00%) low mild
9 (9.00%) high severe

decode 1048576 bytes, mask ff: 💔 Performance has regressed.
       time:   [3.1291 ms 3.1387 ms 3.1497 ms]
       change: [+9.9876% +10.481% +10.958%] (p = 0.00 < 0.05)

Found 10 outliers among 100 measurements (10.00%)
10 (10.00%) high severe

decode 4096 bytes, mask 7f: 💚 Performance has improved.
       time:   [17.643 µs 17.689 µs 17.741 µs]
       change: [-15.841% -15.432% -15.037%] (p = 0.00 < 0.05)

Found 16 outliers among 100 measurements (16.00%)
1 (1.00%) low severe
2 (2.00%) high mild
13 (13.00%) high severe

decode 1048576 bytes, mask 7f: 💔 Performance has regressed.
       time:   [5.4059 ms 5.4190 ms 5.4335 ms]
       change: [+18.613% +19.051% +19.491%] (p = 0.00 < 0.05)

Found 17 outliers among 100 measurements (17.00%)
17 (17.00%) high severe

decode 4096 bytes, mask 3f: 💚 Performance has improved.
       time:   [6.5962 µs 6.6175 µs 6.6443 µs]
       change: [-21.585% -20.973% -20.334%] (p = 0.00 < 0.05)

Found 11 outliers among 100 measurements (11.00%)
7 (7.00%) low mild
1 (1.00%) high mild
3 (3.00%) high severe

decode 1048576 bytes, mask 3f: 💔 Performance has regressed.
       time:   [1.7582 ms 1.7607 ms 1.7657 ms]
       change: [+10.165% +10.644% +11.093%] (p = 0.00 < 0.05)

Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) high mild
2 (2.00%) high severe

coalesce_acked_from_zero 1+1 entries: No change in performance detected.
       time:   [91.139 ns 91.406 ns 91.679 ns]
       change: [-0.6072% -0.2479% +0.1104%] (p = 0.17 > 0.05)

Found 7 outliers among 100 measurements (7.00%)
7 (7.00%) high mild

coalesce_acked_from_zero 3+1 entries: Change within noise threshold.
       time:   [109.52 ns 109.77 ns 110.04 ns]
       change: [-0.7782% -0.3977% -0.0275%] (p = 0.04 < 0.05)

Found 12 outliers among 100 measurements (12.00%)
1 (1.00%) low mild
5 (5.00%) high mild
6 (6.00%) high severe

coalesce_acked_from_zero 10+1 entries: No change in performance detected.
       time:   [109.33 ns 110.09 ns 111.14 ns]
       change: [-1.0776% -0.3200% +0.5680%] (p = 0.46 > 0.05)

Found 14 outliers among 100 measurements (14.00%)
2 (2.00%) low severe
3 (3.00%) low mild
3 (3.00%) high mild
6 (6.00%) high severe

coalesce_acked_from_zero 1000+1 entries: No change in performance detected.
       time:   [93.595 ns 93.725 ns 93.869 ns]
       change: [-1.2582% -0.0120% +1.2107%] (p = 0.99 > 0.05)

Found 9 outliers among 100 measurements (9.00%)
3 (3.00%) high mild
6 (6.00%) high severe

RxStreamOrderer::inbound_frame(): Change within noise threshold.
       time:   [111.33 ms 111.48 ms 111.71 ms]
       change: [-1.0599% -0.8218% -0.5697%] (p = 0.00 < 0.05)

Found 12 outliers among 100 measurements (12.00%)
9 (9.00%) low mild
2 (2.00%) high mild
1 (1.00%) high severe

SentPackets::take_ranges: No change in performance detected.
       time:   [5.1804 µs 5.2733 µs 5.3683 µs]
       change: [-4.1586% -1.3388% +1.7246%] (p = 0.39 > 0.05)

Found 4 outliers among 100 measurements (4.00%)
4 (4.00%) high mild

transfer/pacing-false/varying-seeds: Change within noise threshold.
       time:   [34.259 ms 34.318 ms 34.379 ms]
       change: [-1.5528% -1.2847% -1.0101%] (p = 0.00 < 0.05)
transfer/pacing-true/varying-seeds: Change within noise threshold.
       time:   [34.300 ms 34.351 ms 34.402 ms]
       change: [-1.2588% -1.0311% -0.7832%] (p = 0.00 < 0.05)
transfer/pacing-false/same-seed: Change within noise threshold.
       time:   [34.660 ms 34.709 ms 34.764 ms]
       change: [+0.2871% +0.4972% +0.7157%] (p = 0.00 < 0.05)

Found 4 outliers among 100 measurements (4.00%)
1 (1.00%) low mild
2 (2.00%) high mild
1 (1.00%) high severe

transfer/pacing-true/same-seed: Change within noise threshold.
       time:   [34.317 ms 34.381 ms 34.452 ms]
       change: [-1.2334% -0.9896% -0.7175%] (p = 0.00 < 0.05)

Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe

1-conn/1-100mb-resp/mtu-1504 (aka. Download)/client: No change in performance detected.
       time:   [849.72 ms 859.98 ms 870.74 ms]
       thrpt:  [114.84 MiB/s 116.28 MiB/s 117.69 MiB/s]
change:
       time:   [-0.4654% +1.0876% +2.8568%] (p = 0.20 > 0.05)
       thrpt:  [-2.7775% -1.0759% +0.4675%]
1-conn/10_000-parallel-1b-resp/mtu-1504 (aka. RPS)/client: Change within noise threshold.
       time:   [312.45 ms 315.86 ms 319.33 ms]
       thrpt:  [31.316 Kelem/s 31.659 Kelem/s 32.005 Kelem/s]
change:
       time:   [-3.2534% -1.7324% -0.1001%] (p = 0.03 < 0.05)
       thrpt:  [+0.1002% +1.7630% +3.3628%]
1-conn/1-1b-resp/mtu-1504 (aka. HPS)/client: No change in performance detected.
       time:   [25.325 ms 25.488 ms 25.656 ms]
       thrpt:  [38.977  elem/s 39.234  elem/s 39.487  elem/s]
change:
       time:   [-1.0600% -0.1946% +0.6696%] (p = 0.66 > 0.05)
       thrpt:  [-0.6651% +0.1950% +1.0713%]

Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild

1-conn/1-100mb-resp/mtu-1504 (aka. Upload)/client: 💔 Performance has regressed.
       time:   [1.8598 s 1.8771 s 1.8945 s]
       thrpt:  [52.785 MiB/s 53.274 MiB/s 53.770 MiB/s]
change:
       time:   [+2.1595% +3.5935% +5.1325%] (p = 0.00 < 0.05)
       thrpt:  [-4.8820% -3.4688% -2.1138%]

Client/server transfer results

Performance differences relative to d247751.

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

Client Server CC Pacing Mean ± σ Min Max Δ main Δ main
neqo neqo reno on 529.4 ± 77.1 442.4 773.3 7.9 0.4%
neqo neqo reno 534.5 ± 99.4 454.4 871.9 -18.5 -0.9%
neqo neqo cubic on 553.2 ± 46.6 493.2 700.4 9.9 0.4%
neqo neqo cubic 534.4 ± 36.4 469.0 599.7 -9.9 -0.5%
google neqo reno on 883.7 ± 95.2 649.3 974.8 2.1 0.1%
google neqo reno 892.3 ± 109.1 648.0 1137.6 11.9 0.3%
google neqo cubic on 885.0 ± 97.0 651.1 1032.2 7.0 0.2%
google neqo cubic 884.3 ± 106.5 634.5 1168.4 8.7 0.2%
google google 543.2 ± 24.4 523.4 650.3 -0.5 -0.0%
neqo msquic reno on 236.2 ± 40.5 201.6 399.0 4.8 0.5%
neqo msquic reno 220.9 ± 16.2 197.2 266.0 -10.7 -1.2%
neqo msquic cubic on 228.1 ± 21.6 202.3 286.8 3.7 0.4%
neqo msquic cubic 227.4 ± 35.8 198.1 361.5 0.8 0.1%
msquic msquic 114.5 ± 13.4 99.8 152.9 -5.6 -1.2%

⬇️ Download logs

Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

Yeah, this is better than I had anticipated. The from_repr() method is a bit weird, but you managed to hide it neatly.

neqo-crypto/src/auth.rs Show resolved Hide resolved
@larseggert larseggert marked this pull request as ready for review February 13, 2025 13:01
Copy link
Collaborator

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Great to get rid of these footguns!

Cargo.toml Outdated Show resolved Hide resolved
@larseggert larseggert enabled auto-merge February 14, 2025 06:38
@larseggert larseggert added this pull request to the merge queue Feb 14, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 14, 2025
@larseggert larseggert added this pull request to the merge queue Feb 14, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 14, 2025
@larseggert larseggert merged commit ef6e6f4 into mozilla:main Feb 14, 2025
69 of 72 checks passed
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.

Use strum
3 participants