-
Notifications
You must be signed in to change notification settings - Fork 251
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
A benchmark suite for the getBlock
and getBlocks
RPC calls
#3992
Conversation
accounts-cluster-bench/src/main.rs
Outdated
@@ -586,6 +669,7 @@ fn run_accounts_bench( | |||
loop { | |||
if latest_blockhash.elapsed().as_millis() > 10_000 { | |||
blockhash = poll_get_latest_blockhash(&client).expect("blockhash"); | |||
slot_height_atom.store(poll_slot_height(&client), Ordering::Relaxed); |
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.
This means the slot height will be updated every 10 seconds, along with the blockhash. This is super dumb, but probably good enough.
accounts-cluster-bench/src/main.rs
Outdated
} | ||
} | ||
RpcBench::Blocks => { | ||
static NUM_BLOCKS_TO_FETCH: u64 = 100; |
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.
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.
should we use the max allowed response size instead? for seniority of magic, ofc
accounts-cluster-bench/src/main.rs
Outdated
@@ -329,6 +355,7 @@ fn run_rpc_bench_loop( | |||
program_id: &Pubkey, | |||
max_closed: &AtomicU64, | |||
max_created: &AtomicU64, | |||
slot_height_atom: &AtomicU64, |
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.
nit: here and everywhere else, I'd call this slot_height, then you can rebind the load result on the same name
aec2096
to
903d996
Compare
Used |
903d996
to
f040c3d
Compare
f040c3d
to
399d242
Compare
Updated this to move the |
0985099
Resolved merge conflicts with |
Looks like this PR was merged with CI failures. |
@pgarg66 Yeah; sorry about that. See why, here: #3960 (comment) |
Hey, no worries, thanks for pushing the fix! |
Summary of Changes
Running `/home/sol/src/agave/target/debug/solana-accounts-cluster-bench --identity /home/sol/.config/solana/id.json --iterations 0 --url l --rpc-bench block --rpc-bench blocks` [2024-12-06T23:51:01.249719471Z INFO solana_accounts_cluster_bench] Targeting http://localhost:8899 [2024-12-06T23:51:01.254262179Z INFO solana_accounts_cluster_bench] Starting balance(s): [666938136880] [2024-12-06T23:51:01.255387794Z INFO solana_accounts_cluster_bench] creating 4 new [2024-12-06T23:51:01.259331039Z INFO solana_accounts_cluster_bench] txs: 4 [2024-12-06T23:51:01.284633098Z INFO solana_accounts_cluster_bench] ids: 4 [2024-12-06T23:51:02.293571706Z INFO solana_accounts_cluster_bench] creating 4 new [2024-12-06T23:51:02.294493610Z INFO solana_accounts_cluster_bench] txs: 4 [2024-12-06T23:51:02.317415390Z INFO solana_accounts_cluster_bench] ids: 4 [2024-12-06T23:51:02.819277816Z INFO solana_accounts_cluster_bench] creating 4 new [2024-12-06T23:51:02.820025324Z INFO solana_accounts_cluster_bench] txs: 4 [2024-12-06T23:51:02.834647911Z INFO solana_accounts_cluster_bench] ids: 4 [2024-12-06T23:51:03.339562268Z INFO solana_accounts_cluster_bench] creating 4 new [2024-12-06T23:51:03.340272594Z INFO solana_accounts_cluster_bench] txs: 4 [2024-12-06T23:51:03.355491408Z INFO solana_accounts_cluster_bench] ids: 4 [2024-12-06T23:51:04.360027223Z INFO solana_accounts_cluster_bench] creating 4 new [2024-12-06T23:51:04.360836119Z INFO solana_accounts_cluster_bench] txs: 4 [2024-12-06T23:51:04.375524212Z INFO solana_accounts_cluster_bench] ids: 4 [2024-12-06T23:51:04.375561944Z INFO solana_accounts_cluster_bench] total_accounts_created: 20 total_accounts_closed: 0 tx_sent_count: 20 loop_count: 7 balance(s): [666780919280] [2024-12-06T23:51:04.876743463Z INFO solana_accounts_cluster_bench] creating 4 new [2024-12-06T23:51:04.877447477Z INFO solana_accounts_cluster_bench] txs: 4 [2024-12-06T23:51:04.901852811Z INFO solana_accounts_cluster_bench] ids: 4 [2024-12-06T23:51:05.256347975Z INFO solana_accounts_cluster_bench] t(0) rpc(Block) iters: 792 success: 793 errors: 0 [2024-12-06T23:51:05.256388773Z INFO solana_accounts_cluster_bench] t(0) rpc(Block average success_time: 5041 us [2024-12-06T23:51:05.257692240Z INFO solana_accounts_cluster_bench] t(0) rpc(Blocks) iters: 796 success: 797 errors: 0 [2024-12-06T23:51:05.257735073Z INFO solana_accounts_cluster_bench] t(0) rpc(Blocks average success_time: 5021 us
Related: #3242.