Skip to content

Conversation

@Shourya742
Copy link
Collaborator

@Shourya742 Shourya742 commented Dec 19, 2025

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.

@Shourya742 Shourya742 force-pushed the 2025-12-19-arrange-fuzz-and-bench branch from 4cc64bc to 86e56ad Compare December 19, 2025 14:20
Comment on lines +91 to +99
name = "slower"
path = "fuzz_targets/slower.rs"
test = false
doc = false

[[bin]]
name = "faster"
path = "fuzz_targets/faster.rs"
test = false
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Contributor

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"
Copy link
Contributor

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

Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants