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

refactor(bindings/bench): make harness own IO #4847

Merged
merged 10 commits into from
Dec 16, 2024

Conversation

jmayclin
Copy link
Contributor

Description of changes:

The goal of this PR is to reduce unnecessary abstraction.

Ideally the S2NConnection and OpenSSLConnection structs would just alias the raw types from the corresponding libraries, like s2n_tls::connection::Connection. This refactor is a step in that direction.

Now the ConnPair owns that actual IO Stream, and connections are just handed references (views) to it. Note that I simply used reference counters Rc rather than trying to thread lifetimes through everything.

Testing:

All existing tests should continue to pass.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jmayclin jmayclin marked this pull request as ready for review October 16, 2024 01:08
@github-actions github-actions bot added the s2n-core team label Oct 16, 2024
Copy link
Contributor

@maddeleine maddeleine left a comment

Choose a reason for hiding this comment

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

Have you actually checked that the benchmarks still run with these changes?

bindings/rust/bench/src/harness/io.rs Show resolved Hide resolved
bindings/rust/bench/src/harness/io.rs Show resolved Hide resolved
bindings/rust/bench/src/harness/mod.rs Show resolved Hide resolved
* add copyright header
@jmayclin jmayclin added this pull request to the merge queue Dec 16, 2024
Merged via the queue into aws:main with commit e50f319 Dec 16, 2024
40 checks passed
@jmayclin jmayclin deleted the harness-owns-io branch December 16, 2024 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants