-
Notifications
You must be signed in to change notification settings - Fork 115
Payment benchmark #664
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?
Payment benchmark #664
Conversation
👋 Thanks for assigning @tnull as a reviewer! |
ee6d232
to
53a16a2
Compare
f8dd329
to
fffca97
Compare
To enable more realistic testing with sqlite as a backend.
fffca97
to
058ede1
Compare
Converted test to criterion benchmark and added it to CI. Also removed the payment throttling, now that it has been established that there is a bug in lightning-net-tokio that causes this. For the benchmark, the 1000 payments can now simply be launched at the same time. Criterion reports outliers, so this should be able to detect to occassional 30 sec hangs in the payments test. |
Introduces a criterion-based benchmark that sends 1000 concurrent payments between two LDK nodes to measure total duration. Also adds a CI job to automatically run the benchmark.
058ede1
to
6bdb4d0
Compare
|
||
[[bench]] | ||
name = "payments" | ||
path = "tests/benchmarks.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.
Didn't want to do the default benches
folder, because so many test tools are reused.
use rand::RngCore; | ||
use tokio::task::{self}; | ||
|
||
use crate::common::open_channel_push_amt; |
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.
Leaving clean up to the weekly bot...
🔔 1st Reminder Hey @tnull! This PR has been waiting for your review. |
This PR adds a new async payment benchmark test to
integration_tests_rust.rs
. The test sets up two nodes with a channel and measures performance while sending 1,000 concurrent payments. It uses Tokio’s multi-threaded runtime to spawn payments as separate async tasks and tracks completion through LDK events. The benchmark provides a simple way to gauge throughput and identify performance bottlenecks in payment handling.Related: lightningdevkit/rust-lightning#4161