-
Notifications
You must be signed in to change notification settings - Fork 177
Arrange buffer-sv2 fuzz and bench correctly #2035
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
base: main
Are you sure you want to change the base?
Arrange buffer-sv2 fuzz and bench correctly #2035
Conversation
4cc64bc to
86e56ad
Compare
| name = "slower" | ||
| path = "fuzz_targets/slower.rs" | ||
| test = false | ||
| doc = false | ||
|
|
||
| [[bin]] | ||
| name = "faster" | ||
| path = "fuzz_targets/faster.rs" | ||
| test = false |
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.
I would recommend to change the name of this targets to a more descriptive one.
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.
Since you have more context of the buffer-sv2 crate itself, do you think these targets make sense?
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.
running the faster one I get a local execution of ~= exec/s: 29, which is extremely slow and not recommended.
In less then 30 seconds of execution we get an OOM:
SUMMARY: libFuzzer: out-of-memory
| framing_sv2 = { path = "../sv2/framing-sv2" } | ||
| codec_sv2 = { path = "../sv2/codec-sv2", features = ["noise_sv2"]} | ||
| common_messages_sv2 = { path = "../sv2/subprotocols/common-messages" } | ||
| affinity = "0.1.1" |
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.
Just a note: this crate blocks execution of all the targets on macos. This is used by the slower.rs
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.
If we are going to keep this fuzz targets, maybe we could put this behind features?
part of #2042
This PR moves the buffer_sv2 fuzz targets to the top-level fuzz module. It also makes criterion a dev-dependency; it was previously optional, which caused cargo bench to break. In addition, the benchmarks were not compiling correctly this PR applies minimal fixes to get them building and running. Overall, this brings the benchmarking suite back to a working state.