-
Notifications
You must be signed in to change notification settings - Fork 148
chore: Suppress a new Rust 1.94 clippy #3235
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses a new clippy warning introduced in Rust 1.94 by replacing a potentially lossy type conversion with a safer conversion pattern using try_from and explicit type conversions.
Key changes:
- Refactored type conversion in
fill_bufferfunction to usetry_frominstead of direct casting - Explicitly handles modulo operation with
u8::MAXto prevent overflow
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3235 +/- ##
==========================================
- Coverage 93.47% 93.45% -0.02%
==========================================
Files 125 125
Lines 36582 36582
Branches 36582 36582
==========================================
- Hits 34194 34189 -5
- Misses 1543 1545 +2
- Partials 845 848 +3
|
|
| Branch | chore-clippy |
| Testbed | On-prem |
🚨 2 Alerts
| Benchmark | Measure Units | View | Benchmark Result (Result Δ%) | Upper Boundary (Limit %) |
|---|---|---|---|---|
| decode 1048576 bytes, mask 3f | Latency milliseconds (ms) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 2.86 ms(+66.70%)Baseline: 1.72 ms | 2.26 ms (126.81%) |
| decode 4096 bytes, mask 3f | Latency microseconds (µs) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 11.14 µs(+55.92%)Baseline: 7.14 µs | 10.39 µs (107.22%) |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Upper Boundary nanoseconds (ns) (Limit %) |
|---|---|---|---|
| 1-conn/1-100mb-req/mtu-1504 (aka. Upload)/client | 📈 view plot 🚷 view threshold | 203,040,000.00 ns(-2.29%)Baseline: 207,791,178.71 ns | 217,024,972.36 ns (93.56%) |
| 1-conn/1-100mb-resp/mtu-1504 (aka. Download)/client | 📈 view plot 🚷 view threshold | 200,000,000.00 ns(-1.00%)Baseline: 202,026,216.73 ns | 211,838,248.84 ns (94.41%) |
| 1-conn/1-1b-resp/mtu-1504 (aka. HPS)/client | 📈 view plot 🚷 view threshold | 38,547,000.00 ns(+13.13%)Baseline: 34,071,838.40 ns | 46,041,207.22 ns (83.72%) |
| 1-conn/10_000-parallel-1b-resp/mtu-1504 (aka. RPS)/client | 📈 view plot 🚷 view threshold | 279,910,000.00 ns(-3.16%)Baseline: 289,045,665.40 ns | 302,248,793.28 ns (92.61%) |
| 1-streams/each-1000-bytes/simulated-time | 📈 view plot 🚷 view threshold | 119,020,000.00 ns(+0.18%)Baseline: 118,810,912.55 ns | 120,522,848.62 ns (98.75%) |
| 1-streams/each-1000-bytes/wallclock-time | 📈 view plot 🚷 view threshold | 583,650.00 ns(-1.06%)Baseline: 589,911.10 ns | 610,779.02 ns (95.56%) |
| 1000-streams/each-1-bytes/simulated-time | 📈 view plot 🚷 view threshold | 2,333,100,000.00 ns(-75.83%)Baseline: 9,651,388,783.27 ns | 24,245,214,720.90 ns (9.62%) |
| 1000-streams/each-1-bytes/wallclock-time | 📈 view plot 🚷 view threshold | 12,286,000.00 ns(-8.16%)Baseline: 13,377,764.26 ns | 15,188,779.24 ns (80.89%) |
| 1000-streams/each-1000-bytes/simulated-time | 📈 view plot 🚷 view threshold | 16,071,000,000.00 ns(-10.04%)Baseline: 17,865,446,768.06 ns | 20,879,129,753.24 ns (76.97%) |
| 1000-streams/each-1000-bytes/wallclock-time | 📈 view plot 🚷 view threshold | 49,503,000.00 ns(-2.05%)Baseline: 50,538,239.54 ns | 55,789,955.03 ns (88.73%) |
| RxStreamOrderer::inbound_frame() | 📈 view plot 🚷 view threshold | 109,850,000.00 ns(+0.11%)Baseline: 109,728,441.06 ns | 111,387,559.00 ns (98.62%) |
| coalesce_acked_from_zero 1+1 entries | 📈 view plot 🚷 view threshold | 89.34 ns(+0.27%)Baseline: 89.10 ns | 90.40 ns (98.82%) |
| coalesce_acked_from_zero 10+1 entries | 📈 view plot 🚷 view threshold | 105.68 ns(-0.34%)Baseline: 106.04 ns | 107.12 ns (98.66%) |
| coalesce_acked_from_zero 1000+1 entries | 📈 view plot 🚷 view threshold | 92.16 ns(+1.40%)Baseline: 90.88 ns | 95.24 ns (96.76%) |
| coalesce_acked_from_zero 3+1 entries | 📈 view plot 🚷 view threshold | 106.26 ns(-0.26%)Baseline: 106.54 ns | 107.54 ns (98.81%) |
| decode 1048576 bytes, mask 3f | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 2,863,900.00 ns(+66.70%)Baseline: 1,718,020.53 ns | 2,258,430.73 ns (126.81%) |
| decode 1048576 bytes, mask 7f | 📈 view plot 🚷 view threshold | 2,428,000.00 ns(-51.15%)Baseline: 4,969,905.70 ns | 6,085,973.73 ns (39.90%) |
| decode 1048576 bytes, mask ff | 📈 view plot 🚷 view threshold | 1,760,800.00 ns(-40.88%)Baseline: 2,978,230.04 ns | 3,510,973.19 ns (50.15%) |
| decode 4096 bytes, mask 3f | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 11,136.00 ns(+55.92%)Baseline: 7,141.91 ns | 10,386.01 ns (107.22%) |
| decode 4096 bytes, mask 7f | 📈 view plot 🚷 view threshold | 9,510.90 ns(-50.97%)Baseline: 19,399.47 ns | 23,774.91 ns (40.00%) |
| decode 4096 bytes, mask ff | 📈 view plot 🚷 view threshold | 6,912.00 ns(-38.35%)Baseline: 11,211.15 ns | 13,320.63 ns (51.89%) |
| sent::Packets::take_ranges | 📈 view plot 🚷 view threshold | 4,519.50 ns(-3.53%)Baseline: 4,684.74 ns | 4,927.17 ns (91.73%) |
| transfer/pacing-false/same-seed/simulated-time/run | 📈 view plot 🚷 view threshold | 23,941,000,000.00 ns(-5.39%)Baseline: 25,304,921,755.73 ns | 26,108,630,795.07 ns (91.70%) |
| transfer/pacing-false/same-seed/wallclock-time/run | 📈 view plot 🚷 view threshold | 23,705,000.00 ns(-6.50%)Baseline: 25,353,246.18 ns | 27,040,552.01 ns (87.66%) |
| transfer/pacing-false/varying-seeds/simulated-time/run | 📈 view plot 🚷 view threshold | 23,941,000,000.00 ns(-4.76%)Baseline: 25,138,396,946.56 ns | 25,667,859,740.67 ns (93.27%) |
| transfer/pacing-false/varying-seeds/wallclock-time/run | 📈 view plot 🚷 view threshold | 23,387,000.00 ns(-8.30%)Baseline: 25,503,881.68 ns | 27,250,661.42 ns (85.82%) |
| transfer/pacing-true/same-seed/simulated-time/run | 📈 view plot 🚷 view threshold | 23,676,000,000.00 ns(-6.66%)Baseline: 25,364,404,580.15 ns | 26,303,362,675.43 ns (90.01%) |
| transfer/pacing-true/same-seed/wallclock-time/run | 📈 view plot 🚷 view threshold | 23,619,000.00 ns(-10.98%)Baseline: 26,533,085.88 ns | 28,757,385.16 ns (82.13%) |
| transfer/pacing-true/varying-seeds/simulated-time/run | 📈 view plot 🚷 view threshold | 23,676,000,000.00 ns(-5.10%)Baseline: 24,948,702,290.08 ns | 25,512,366,260.04 ns (92.80%) |
| transfer/pacing-true/varying-seeds/wallclock-time/run | 📈 view plot 🚷 view threshold | 23,836,000.00 ns(-8.35%)Baseline: 26,006,297.71 ns | 27,832,692.02 ns (85.64%) |
Failed Interop TestsQUIC Interop Runner, client vs. server, differences relative to 042e684. All resultsSucceeded Interop TestsQUIC Interop Runner, client vs. server neqo-latest as client
neqo-latest as server
Unsupported Interop TestsQUIC Interop Runner, client vs. server neqo-latest as client
neqo-latest as server
|
Client/server transfer resultsPerformance differences relative to baf9d05. Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.
Table above only shows statistically significant changes. See all results below. All resultsTransfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.
Download data for |
Benchmark resultsSignificant performance differences relative to ee5f551. 1-conn/1-100mb-req/mtu-1504 (aka. Upload)/client: 💚 Performance has improved by -3.1166%. time: [202.70 ms 203.04 ms 203.44 ms]
thrpt: [491.56 MiB/s 492.52 MiB/s 493.34 MiB/s]
change:
time: [-3.4264% -3.1166% -2.8388] (p = 0.00 < 0.05)
thrpt: [+2.9217% +3.2168% +3.5479]
Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severeAll results1-conn/1-100mb-resp/mtu-1504 (aka. Download)/client: Change within noise threshold. time: [199.51 ms 200.00 ms 200.58 ms]
thrpt: [498.55 MiB/s 499.99 MiB/s 501.23 MiB/s]
change:
time: [-1.4929% -1.1958% -0.8838] (p = 0.00 < 0.05)
thrpt: [+0.8917% +1.2102% +1.5156]
Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe1-conn/10_000-parallel-1b-resp/mtu-1504 (aka. RPS)/client: Change within noise threshold. time: [278.10 ms 279.91 ms 281.74 ms]
thrpt: [35.494 Kelem/s 35.725 Kelem/s 35.958 Kelem/s]
change:
time: [-2.5399% -1.6422% -0.7307] (p = 0.00 < 0.05)
thrpt: [+0.7360% +1.6696% +2.6061]
Change within noise threshold.1-conn/1-1b-resp/mtu-1504 (aka. HPS)/client: No change in performance detected. time: [38.427 ms 38.547 ms 38.686 ms]
thrpt: [25.849 B/s 25.942 B/s 26.024 B/s]
change:
time: [-0.9823% -0.3569% +0.2283] (p = 0.27 > 0.05)
thrpt: [-0.2278% +0.3581% +0.9921]
No change in performance detected.
Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) high severe1-conn/1-100mb-req/mtu-1504 (aka. Upload)/client: 💚 Performance has improved by -3.1166%. time: [202.70 ms 203.04 ms 203.44 ms]
thrpt: [491.56 MiB/s 492.52 MiB/s 493.34 MiB/s]
change:
time: [-3.4264% -3.1166% -2.8388] (p = 0.00 < 0.05)
thrpt: [+2.9217% +3.2168% +3.5479]
Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severedecode 4096 bytes, mask ff: No change in performance detected. time: [6.8995 µs 6.9120 µs 6.9255 µs]
change: [-0.2782% +0.0993% +0.4713] (p = 0.62 > 0.05)
No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
4 (4.00%) high mild
1 (1.00%) high severedecode 1048576 bytes, mask ff: Change within noise threshold. time: [1.7576 ms 1.7608 ms 1.7643 ms]
change: [-1.1251% -0.5843% -0.1754] (p = 0.01 < 0.05)
Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high milddecode 4096 bytes, mask 7f: No change in performance detected. time: [9.4957 µs 9.5109 µs 9.5263 µs]
change: [-0.1602% +0.2414% +0.7095] (p = 0.32 > 0.05)
No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) high mild
2 (2.00%) high severedecode 1048576 bytes, mask 7f: No change in performance detected. time: [2.4243 ms 2.4280 ms 2.4319 ms]
change: [-0.1892% +0.0315% +0.2640] (p = 0.78 > 0.05)
No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severedecode 4096 bytes, mask 3f: No change in performance detected. time: [11.110 µs 11.136 µs 11.162 µs]
change: [-0.6003% -0.0680% +0.4699] (p = 0.81 > 0.05)
No change in performance detected.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) high mild
2 (2.00%) high severedecode 1048576 bytes, mask 3f: Change within noise threshold. time: [2.8587 ms 2.8639 ms 2.8692 ms]
change: [+0.1589% +0.4152% +0.6687] (p = 0.00 < 0.05)
Change within noise threshold.1-streams/each-1000-bytes/wallclock-time: No change in performance detected. time: [582.91 µs 583.65 µs 584.39 µs]
change: [-1.1233% -0.5019% -0.0114] (p = 0.08 > 0.05)
No change in performance detected.1-streams/each-1000-bytes/simulated-time: No change in performance detected. time: [118.81 ms 119.02 ms 119.24 ms]
thrpt: [8.1899 KiB/s 8.2048 KiB/s 8.2198 KiB/s]
change:
time: [-0.2365% +0.0170% +0.2467] (p = 0.89 > 0.05)
thrpt: [-0.2460% -0.0170% +0.2370]
No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) low mild
1 (1.00%) high mild1000-streams/each-1-bytes/wallclock-time: Change within noise threshold. time: [12.248 ms 12.286 ms 12.325 ms]
change: [-1.1979% -0.6012% -0.0780] (p = 0.03 < 0.05)
Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild1000-streams/each-1-bytes/simulated-time: No change in performance detected. time: [2.3294 s 2.3331 s 2.3368 s]
thrpt: [427.93 B/s 428.61 B/s 429.30 B/s]
change:
time: [-0.1829% +0.0475% +0.2654] (p = 0.68 > 0.05)
thrpt: [-0.2647% -0.0475% +0.1832]
No change in performance detected.1000-streams/each-1000-bytes/wallclock-time: No change in performance detected. time: [49.391 ms 49.503 ms 49.616 ms]
change: [-0.1648% +0.1204% +0.4297] (p = 0.46 > 0.05)
No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild1000-streams/each-1000-bytes/simulated-time: No change in performance detected. time: [15.836 s 16.071 s 16.305 s]
thrpt: [59.894 KiB/s 60.767 KiB/s 61.666 KiB/s]
change:
time: [-4.1184% -2.0827% +0.1185] (p = 0.06 > 0.05)
thrpt: [-0.1184% +2.1270% +4.2953]
No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mildcoalesce_acked_from_zero 1+1 entries: No change in performance detected. time: [89.022 ns 89.337 ns 89.657 ns]
change: [-1.4514% -0.5886% +0.1152] (p = 0.15 > 0.05)
No change in performance detected.
Found 11 outliers among 100 measurements (11.00%)
8 (8.00%) high mild
3 (3.00%) high severecoalesce_acked_from_zero 3+1 entries: No change in performance detected. time: [105.91 ns 106.26 ns 106.62 ns]
change: [-0.1722% +0.4294% +1.2791] (p = 0.29 > 0.05)
No change in performance detected.
Found 14 outliers among 100 measurements (14.00%)
1 (1.00%) high mild
13 (13.00%) high severecoalesce_acked_from_zero 10+1 entries: No change in performance detected. time: [105.31 ns 105.68 ns 106.14 ns]
change: [-2.1259% -0.7820% +0.1524] (p = 0.22 > 0.05)
No change in performance detected.
Found 15 outliers among 100 measurements (15.00%)
7 (7.00%) low mild
2 (2.00%) high mild
6 (6.00%) high severecoalesce_acked_from_zero 1000+1 entries: Change within noise threshold. time: [91.942 ns 92.155 ns 92.458 ns]
change: [+0.0223% +0.5397% +1.0424] (p = 0.04 < 0.05)
Change within noise threshold.
Found 9 outliers among 100 measurements (9.00%)
5 (5.00%) high mild
4 (4.00%) high severeRxStreamOrderer::inbound_frame(): Change within noise threshold. time: [109.77 ms 109.85 ms 109.94 ms]
change: [-0.5234% -0.4194% -0.3247] (p = 0.00 < 0.05)
Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) low mild
1 (1.00%) high mildsent::Packets::take_ranges: No change in performance detected. time: [4.4336 µs 4.5195 µs 4.5918 µs]
change: [-5.7391% -2.3929% +1.0136] (p = 0.18 > 0.05)
No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mildtransfer/pacing-false/varying-seeds/wallclock-time/run: Change within noise threshold. time: [23.357 ms 23.387 ms 23.434 ms]
change: [-1.1594% -0.9639% -0.7169] (p = 0.00 < 0.05)
Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severetransfer/pacing-false/varying-seeds/simulated-time/run: 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/pacing-true/varying-seeds/wallclock-time/run: No change in performance detected. time: [23.811 ms 23.836 ms 23.872 ms]
change: [-0.0497% +0.1630% +0.3485] (p = 0.12 > 0.05)
No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severetransfer/pacing-true/varying-seeds/simulated-time/run: 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/pacing-false/same-seed/wallclock-time/run: Change within noise threshold. time: [23.676 ms 23.705 ms 23.746 ms]
change: [-1.3950% -1.2341% -1.0452] (p = 0.00 < 0.05)
Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severetransfer/pacing-false/same-seed/simulated-time/run: 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/pacing-true/same-seed/wallclock-time/run: Change within noise threshold. time: [23.588 ms 23.619 ms 23.665 ms]
change: [-2.8617% -2.7171% -2.5079] (p = 0.00 < 0.05)
Change within noise threshold.
Found 4 outliers among 100 measurements (4.00%)
2 (2.00%) high mild
2 (2.00%) high severetransfer/pacing-true/same-seed/simulated-time/run: 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.Download data for |
No description provided.