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

Add litep2p network protocol benches #6455

Merged
merged 4 commits into from
Nov 13, 2024

Conversation

AndreiEres
Copy link
Contributor

@AndreiEres AndreiEres commented Nov 12, 2024

Description

Add support to run networking protocol benchmarks with litep2p backend.

Now we can compare the work of both libp2p and litep2p backends for notifications and request-response protocols.

Next step: extract worker initialization from the benchmark loop.

Example run on local machine

image

Integration

Does not affect downstream projects.

Review Notes

impl NetworkRequest for Litep2pNetworkService {
async fn request(
&self,
_target: PeerId,
_protocol: ProtocolName,
_request: Vec<u8>,
_fallback_request: Option<(Vec<u8>, ProtocolName)>,
_connect: IfDisconnected,
) -> Result<(Vec<u8>, ProtocolName), RequestFailure> {
unimplemented!();
}

This method should be implemented to run request benchmarks.

@AndreiEres AndreiEres added R0-silent Changes should not be mentioned in any release notes T12-benchmarks This PR/Issue is related to benchmarking and weights. labels Nov 12, 2024
@dmitry-markin
Copy link
Contributor

As a side note to the PR description: how to interpret the plot axes? Naive understanding brings the question up why the time is the same for 10^3 bytes and for 10^6 bytes?

Copy link
Contributor

@dmitry-markin dmitry-markin left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

@lexnv lexnv left a comment

Choose a reason for hiding this comment

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

LGTM! Amazing work here Andrei! 🙏

@AndreiEres
Copy link
Contributor Author

As a side note to the PR description: how to interpret the plot axes? Naive understanding brings the question up why the time is the same for 10^3 bytes and for 10^6 bytes?

Either the worker initialization or the size difference is not significant.

@AndreiEres
Copy link
Contributor Author

/cmd prdoc --audience node_dev --bump silent

@AndreiEres AndreiEres added this pull request to the merge queue Nov 13, 2024
Merged via the queue into master with commit 6b84431 Nov 13, 2024
194 of 197 checks passed
@AndreiEres AndreiEres deleted the AndreiEres/litep2p-protocol-bench branch November 13, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes T12-benchmarks This PR/Issue is related to benchmarking and weights.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants