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: Guard testing functions properly #2264

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

larseggert
Copy link
Collaborator

We have a bunch of functions that in their doc comments say that they are for testing purposes only. This commit adds guards to those functions to make sure they are not used in production code.

We have a bunch of functions that in their doc comments say that they are
for testing purposes only. This commit adds guards to those functions
to make sure they are not used in production code.
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.39%. Comparing base (9143d73) to head (be69b4b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2264   +/-   ##
=======================================
  Coverage   95.39%   95.39%           
=======================================
  Files         113      113           
  Lines       36683    36683           
=======================================
+ Hits        34993    34994    +1     
+ Misses       1690     1689    -1     

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

Copy link

github-actions bot commented Dec 3, 2024

Failed Interop Tests

QUIC Interop Runner, client vs. server, differences relative to 9143d73.

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 Dec 3, 2024

Benchmark results

Performance differences relative to 9143d73.

decode 4096 bytes, mask ff: No change in performance detected.
       time:   [15.850 µs 15.895 µs 15.946 µs]
       change: [-0.3443% +0.0997% +0.5489%] (p = 0.66 > 0.05)

Found 15 outliers among 100 measurements (15.00%)
2 (2.00%) low mild
2 (2.00%) high mild
11 (11.00%) high severe

decode 1048576 bytes, mask ff: No change in performance detected.
       time:   [4.0530 ms 4.0649 ms 4.0786 ms]
       change: [-0.2525% +0.1467% +0.5633%] (p = 0.50 > 0.05)

Found 11 outliers among 100 measurements (11.00%)
11 (11.00%) high severe

decode 4096 bytes, mask 7f: Change within noise threshold.
       time:   [26.896 µs 26.964 µs 27.035 µs]
       change: [-1.2858% -0.9043% -0.5360%] (p = 0.00 < 0.05)

Found 21 outliers among 100 measurements (21.00%)
3 (3.00%) low mild
1 (1.00%) high mild
17 (17.00%) high severe

decode 1048576 bytes, mask 7f: No change in performance detected.
       time:   [6.8887 ms 6.9095 ms 6.9383 ms]
       change: [-0.5009% -0.0577% +0.4285%] (p = 0.82 > 0.05)

Found 19 outliers among 100 measurements (19.00%)
19 (19.00%) high severe

decode 4096 bytes, mask 3f: No change in performance detected.
       time:   [12.437 µs 12.482 µs 12.533 µs]
       change: [-0.2843% +0.2150% +0.7036%] (p = 0.42 > 0.05)

Found 21 outliers among 100 measurements (21.00%)
1 (1.00%) low mild
2 (2.00%) high mild
18 (18.00%) high severe

decode 1048576 bytes, mask 3f: No change in performance detected.
       time:   [3.1835 ms 3.1993 ms 3.2211 ms]
       change: [+0.0183% +0.6176% +1.3667%] (p = 0.07 > 0.05)

Found 12 outliers among 100 measurements (12.00%)
1 (1.00%) high mild
11 (11.00%) high severe

coalesce_acked_from_zero 1+1 entries: No change in performance detected.
       time:   [98.555 ns 98.876 ns 99.201 ns]
       change: [-0.8423% -0.3746% +0.0509%] (p = 0.10 > 0.05)

Found 9 outliers among 100 measurements (9.00%)
7 (7.00%) high mild
2 (2.00%) high severe

coalesce_acked_from_zero 3+1 entries: No change in performance detected.
       time:   [116.57 ns 116.90 ns 117.25 ns]
       change: [-0.5616% -0.1955% +0.1787%] (p = 0.32 > 0.05)

Found 19 outliers among 100 measurements (19.00%)
3 (3.00%) low severe
5 (5.00%) high mild
11 (11.00%) high severe

coalesce_acked_from_zero 10+1 entries: No change in performance detected.
       time:   [116.25 ns 116.70 ns 117.25 ns]
       change: [-0.5725% +0.0732% +0.8565%] (p = 0.86 > 0.05)

Found 17 outliers among 100 measurements (17.00%)
6 (6.00%) low severe
1 (1.00%) low mild
2 (2.00%) high mild
8 (8.00%) high severe

coalesce_acked_from_zero 1000+1 entries: No change in performance detected.
       time:   [97.146 ns 97.299 ns 97.471 ns]
       change: [-0.6287% +0.1268% +0.9059%] (p = 0.77 > 0.05)

Found 10 outliers among 100 measurements (10.00%)
4 (4.00%) high mild
6 (6.00%) high severe

RxStreamOrderer::inbound_frame(): No change in performance detected.
       time:   [111.40 ms 111.54 ms 111.75 ms]
       change: [-0.2218% +0.0351% +0.2748%] (p = 0.81 > 0.05)

Found 22 outliers among 100 measurements (22.00%)
1 (1.00%) low severe
10 (10.00%) low mild
10 (10.00%) high mild
1 (1.00%) high severe

SentPackets::take_ranges: No change in performance detected.
       time:   [5.5545 µs 5.7412 µs 5.9374 µs]
       change: [-14.791% -3.3445% +4.9983%] (p = 0.71 > 0.05)

Found 8 outliers among 100 measurements (8.00%)
8 (8.00%) high mild

transfer/pacing-false/varying-seeds: No change in performance detected.
       time:   [25.671 ms 26.771 ms 27.891 ms]
       change: [-7.1348% -2.2203% +3.2224%] (p = 0.40 > 0.05)

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

transfer/pacing-true/varying-seeds: No change in performance detected.
       time:   [33.852 ms 35.528 ms 37.214 ms]
       change: [-5.8853% +0.1557% +7.1992%] (p = 0.97 > 0.05)
transfer/pacing-false/same-seed: No change in performance detected.
       time:   [24.937 ms 25.745 ms 26.556 ms]
       change: [-1.8407% +2.2995% +6.9377%] (p = 0.32 > 0.05)

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

transfer/pacing-true/same-seed: No change in performance detected.
       time:   [38.684 ms 40.541 ms 42.403 ms]
       change: [-10.289% -4.4660% +2.0599%] (p = 0.18 > 0.05)
1-conn/1-100mb-resp/mtu-1504 (aka. Download)/client: 💚 Performance has improved.
       time:   [858.51 ms 867.59 ms 876.83 ms]
       thrpt:  [114.05 MiB/s 115.26 MiB/s 116.48 MiB/s]
change:
       time:   [-8.7753% -7.3972% -5.8580%] (p = 0.00 < 0.05)
       thrpt:  [+6.2225% +7.9881% +9.6194%]
1-conn/10_000-parallel-1b-resp/mtu-1504 (aka. RPS)/client: No change in performance detected.
       time:   [314.30 ms 317.55 ms 320.84 ms]
       thrpt:  [31.168 Kelem/s 31.491 Kelem/s 31.816 Kelem/s]
change:
       time:   [-1.5298% -0.1924% +1.1814%] (p = 0.79 > 0.05)
       thrpt:  [-1.1676% +0.1928% +1.5536%]
1-conn/1-1b-resp/mtu-1504 (aka. HPS)/client: No change in performance detected.
       time:   [33.567 ms 33.731 ms 33.892 ms]
       thrpt:  [29.506  elem/s 29.647  elem/s 29.791  elem/s]
change:
       time:   [-1.4397% -0.6429% +0.0557%] (p = 0.09 > 0.05)
       thrpt:  [-0.0557% +0.6471% +1.4607%]

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

1-conn/1-100mb-resp/mtu-1504 (aka. Upload)/client: No change in performance detected.
       time:   [1.6696 s 1.6903 s 1.7110 s]
       thrpt:  [58.444 MiB/s 59.160 MiB/s 59.896 MiB/s]
change:
       time:   [-0.3879% +1.4306% +3.2599%] (p = 0.12 > 0.05)
       thrpt:  [-3.1570% -1.4105% +0.3894%]

Client/server transfer results

Transfer of 33554432 bytes over loopback.

Client Server CC Pacing MTU Mean [ms] Min [ms] Max [ms]
gquiche gquiche 1504 512.9 ± 8.7 504.5 528.3
neqo gquiche reno on 1504 759.4 ± 12.0 737.1 776.3
neqo gquiche reno 1504 765.8 ± 12.7 746.5 790.6
neqo gquiche cubic on 1504 771.7 ± 72.2 727.1 974.4
neqo gquiche cubic 1504 795.8 ± 11.5 776.7 810.7
msquic msquic 1504 99.1 ± 10.6 90.2 120.5
neqo msquic reno on 1504 206.7 ± 9.0 196.1 223.5
neqo msquic reno 1504 216.4 ± 9.0 200.7 230.7
neqo msquic cubic on 1504 219.5 ± 11.1 201.5 238.5
neqo msquic cubic 1504 237.2 ± 67.0 201.1 458.3
gquiche neqo reno on 1504 689.1 ± 87.7 558.2 813.6
gquiche neqo reno 1504 688.7 ± 91.5 550.6 818.9
gquiche neqo cubic on 1504 681.6 ± 89.4 547.9 810.3
gquiche neqo cubic 1504 695.8 ± 89.5 569.8 828.8
msquic neqo reno on 1504 479.3 ± 7.1 469.2 488.0
msquic neqo reno 1504 506.6 ± 63.4 470.9 683.1
msquic neqo cubic on 1504 490.2 ± 7.8 478.6 499.0
msquic neqo cubic 1504 468.4 ± 9.1 458.0 484.3
neqo neqo reno on 1504 506.3 ± 35.4 462.0 551.3
neqo neqo reno 1504 492.9 ± 19.3 458.7 525.2
neqo neqo cubic on 1504 524.7 ± 31.2 453.9 563.3
neqo neqo cubic 1504 530.1 ± 46.8 475.3 620.8

⬇️ Download logs

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.

Very much in favor of not accidentally using test functions in production code.

neqo-common/Cargo.toml Show resolved Hide resolved
@larseggert larseggert added this pull request to the merge queue Dec 3, 2024
Merged via the queue into mozilla:main with commit a758177 Dec 3, 2024
61 of 63 checks passed
@larseggert larseggert deleted the chore-enforce-testing branch December 3, 2024 15:40
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