-
Notifications
You must be signed in to change notification settings - Fork 126
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
base: main
Are you sure you want to change the base?
chore: Use strum
macros
#2440
Conversation
And remove some boilerplate code. Fixes mozilla#2439
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2440 +/- ##
==========================================
+ Coverage 95.26% 95.37% +0.10%
==========================================
Files 115 115
Lines 37198 37099 -99
Branches 37198 37099 -99
==========================================
- Hits 35436 35382 -54
+ Misses 1756 1711 -45
Partials 6 6 ☔ View full report in Codecov by Sentry. |
Failed Interop TestsQUIC Interop Runner, client vs. server, differences relative to 966ece6. neqo-latest as client
neqo-latest as server
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
|
Benchmark resultsPerformance differences relative to 966ece6. decode 4096 bytes, mask ff: 💚 Performance has improved.time: [10.871 µs 10.913 µs 10.959 µs] change: [-12.543% -12.066% -11.643%] (p = 0.00 < 0.05) decode 1048576 bytes, mask ff: 💔 Performance has regressed.time: [3.1271 ms 3.1362 ms 3.1468 ms] change: [+9.6136% +10.207% +10.737%] (p = 0.00 < 0.05) decode 4096 bytes, mask 7f: 💚 Performance has improved.time: [17.631 µs 17.677 µs 17.727 µs] change: [-15.974% -15.671% -15.389%] (p = 0.00 < 0.05) decode 1048576 bytes, mask 7f: 💔 Performance has regressed.time: [5.4033 ms 5.4159 ms 5.4291 ms] change: [+18.559% +18.997% +19.415%] (p = 0.00 < 0.05) decode 4096 bytes, mask 3f: 💚 Performance has improved.time: [6.6196 µs 6.6531 µs 6.6900 µs] change: [-21.439% -20.961% -20.534%] (p = 0.00 < 0.05) decode 1048576 bytes, mask 3f: 💔 Performance has regressed.time: [1.7652 ms 1.7735 ms 1.7820 ms] change: [+10.564% +11.283% +12.007%] (p = 0.00 < 0.05) coalesce_acked_from_zero 1+1 entries: No change in performance detected.time: [91.462 ns 91.832 ns 92.196 ns] change: [-0.3915% +0.0327% +0.4255%] (p = 0.88 > 0.05) coalesce_acked_from_zero 3+1 entries: No change in performance detected.time: [109.76 ns 110.80 ns 112.57 ns] change: [-0.4305% +0.1404% +0.9376%] (p = 0.71 > 0.05) coalesce_acked_from_zero 10+1 entries: No change in performance detected.time: [109.38 ns 109.81 ns 110.33 ns] change: [-0.6040% +0.3574% +1.2906%] (p = 0.51 > 0.05) coalesce_acked_from_zero 1000+1 entries: No change in performance detected.time: [93.893 ns 94.025 ns 94.172 ns] change: [-0.3277% +0.7775% +1.9241%] (p = 0.18 > 0.05) RxStreamOrderer::inbound_frame(): Change within noise threshold.time: [111.63 ms 111.68 ms 111.74 ms] change: [-0.5751% -0.5101% -0.4479%] (p = 0.00 < 0.05) SentPackets::take_ranges: No change in performance detected.time: [5.3256 µs 5.4941 µs 5.6718 µs] change: [-3.1503% +0.3448% +3.6158%] (p = 0.85 > 0.05) transfer/pacing-false/varying-seeds: No change in performance detected.time: [34.213 ms 34.277 ms 34.347 ms] change: [-0.3882% -0.1404% +0.1236%] (p = 0.29 > 0.05) transfer/pacing-true/varying-seeds: Change within noise threshold.time: [34.235 ms 34.303 ms 34.375 ms] change: [-0.8519% -0.6059% -0.3590%] (p = 0.00 < 0.05) transfer/pacing-false/same-seed: Change within noise threshold.time: [34.005 ms 34.063 ms 34.123 ms] change: [-1.3367% -1.0939% -0.8652%] (p = 0.00 < 0.05) transfer/pacing-true/same-seed: No change in performance detected.time: [34.437 ms 34.482 ms 34.529 ms] change: [-0.0224% +0.2201% +0.4457%] (p = 0.07 > 0.05) 1-conn/1-100mb-resp/mtu-1504 (aka. Download)/client: 💔 Performance has regressed.time: [862.61 ms 873.89 ms 885.47 ms] thrpt: [112.93 MiB/s 114.43 MiB/s 115.93 MiB/s] change: time: [+3.0710% +4.9809% +6.9210%] (p = 0.00 < 0.05) thrpt: [-6.4730% -4.7446% -2.9795%] 1-conn/10_000-parallel-1b-resp/mtu-1504 (aka. RPS)/client: No change in performance detected.time: [317.64 ms 320.98 ms 324.30 ms] thrpt: [30.835 Kelem/s 31.154 Kelem/s 31.483 Kelem/s] change: time: [-2.0190% -0.5610% +0.8917%] (p = 0.46 > 0.05) thrpt: [-0.8838% +0.5641% +2.0606%] 1-conn/1-1b-resp/mtu-1504 (aka. HPS)/client: No change in performance detected.time: [25.431 ms 25.598 ms 25.773 ms] thrpt: [38.800 elem/s 39.065 elem/s 39.322 elem/s] change: time: [-0.8695% +0.0099% +0.9625%] (p = 0.98 > 0.05) thrpt: [-0.9534% -0.0099% +0.8771%] 1-conn/1-100mb-resp/mtu-1504 (aka. Upload)/client: No change in performance detected.time: [1.8686 s 1.8878 s 1.9071 s] thrpt: [52.435 MiB/s 52.973 MiB/s 53.517 MiB/s] change: time: [-0.2142% +1.2999% +2.8261%] (p = 0.09 > 0.05) thrpt: [-2.7484% -1.2832% +0.2147%] Client/server transfer resultsPerformance differences relative to 966ece6. Transfer of 33554432 bytes over loopback, 30 runs. All unit-less numbers are in milliseconds.
|
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.
Yeah, this is better than I had anticipated. The from_repr()
method is a bit weird, but you managed to hide it neatly.
use crate::err::{mozpkix, sec, ssl, PRErrorCode}; | ||
|
||
/// The outcome of authentication. | ||
#[derive(Clone, Copy, Debug, PartialEq, Eq)] | ||
#[derive(Clone, Copy, Debug, PartialEq, Eq, FromRepr)] | ||
#[repr(i32)] |
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.
Does this work?
#[repr(i32)] | |
#[repr(PRErrorCode)] |
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.
Unfortunately not, I had tried that:
error[E0552]: unrecognized representation hint
--> neqo-crypto/src/auth.rs:13:8
|
13 | #[repr(PRErrorCode)]
| ^^^^^^^^^^^
|
= help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
And remove some boilerplate code.
Fixes #2439