Conversation
Benchmark resultsInstruction countsSignificant differencesClick to expand
Other differencesClick to expand
Wall-timeSignificant differencesClick to expand
Other differencesClick to expand
Memory usageKey:
Significant differencesClick to expand
Additional informationCheckout details:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2949 +/- ##
==========================================
- Coverage 92.74% 92.72% -0.03%
==========================================
Files 98 98
Lines 21944 21883 -61
Branches 622 623 +1
==========================================
- Hits 20353 20290 -63
- Misses 1446 1448 +2
Partials 145 145 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| fn test_quic_exporter() { | ||
| let provider = provider::DEFAULT_TLS13_PROVIDER; | ||
| for &kt in KeyType::all_for_provider(&provider) { | ||
| dbg!(kt); |
| output.emit(Event::QuicEarlySecret(Some( | ||
| client_early_traffic_secret.clone(), | ||
| ))); | ||
| quic.early_secret = Some(client_early_traffic_secret.clone()); |
There was a problem hiding this comment.
Would be preferable for testability, I think, to have this access be via a trait, and be write-only. This also avoids the previous mire we were in where random other types were used for storage of values.
| if let Some(quic) = output.quic() { | ||
| quic.hs_secrets = Some(quic::Secrets::new( | ||
| client_secret.clone(), | ||
| server_secret.clone(), | ||
| self.ks.suite, | ||
| self.ks.suite.quic.unwrap(), | ||
| self.ks.side, | ||
| quic_version, | ||
| ))); | ||
| quic.version, | ||
| )); |
There was a problem hiding this comment.
Example of a two-way dependency, where the value output to quic.hs_secrets depends on the value read via output.quic() rather than the immutable version known by this object.
There was a problem hiding this comment.
Remind me why this useful/necessary? Should we document it somewhere?
(I agree that it was very messy before, but at a much smaller scale I don't see many issues?)
|
|
||
| fn start_traffic(&mut self); | ||
|
|
||
| fn send(&mut self) -> &mut SendPath; |
There was a problem hiding this comment.
Suggest extracting a trait here rather than using the concrete SendPath for testability? All methods on the trait should return unit.
There was a problem hiding this comment.
Why should they all yield unit?
| &mut self, | ||
| msg: &Message<'_>, | ||
| output: &mut dyn Output, | ||
| send: &mut SendPath, |
There was a problem hiding this comment.
This is not possible later, as the caller no longer has a SendPath to give. It has an impl Output {} which locks a Mutex and dispatches events into it.
|
Okay, so I should rework this to have specific traits for both |
Breaks down some of the more dynamic aspects of the
Outputtrait setup to bring back more type safety, hopefully without compromising too much on modularity.Also less code, and up to 6.5% wins on no crypto benchmarks.