diff --git a/entry/benches/entry_sigverify.rs b/entry/benches/entry_sigverify.rs index b3a1b7b5cdb3e6..9097de576525ef 100644 --- a/entry/benches/entry_sigverify.rs +++ b/entry/benches/entry_sigverify.rs @@ -3,6 +3,7 @@ extern crate test; use { solana_entry::entry::{self, VerifyRecyclers}, solana_perf::test_tx::test_tx, + solana_rayon_threadlimit::get_max_thread_count, solana_sdk::{ hash::Hash, transaction::{ @@ -16,6 +17,12 @@ use { #[bench] fn bench_gpusigverify(bencher: &mut Bencher) { + let thread_pool = rayon::ThreadPoolBuilder::new() + .num_threads(get_max_thread_count()) + .thread_name(|i| format!("solEntryBench{i:02}")) + .build() + .expect("new rayon threadpool"); + let entries = (0..131072) .map(|_| { let transaction = test_tx(); @@ -53,6 +60,7 @@ fn bench_gpusigverify(bencher: &mut Bencher) { let res = entry::start_verify_transactions( entries.clone(), false, + &thread_pool, recycler.clone(), Arc::new(verify_transaction), ); @@ -65,6 +73,12 @@ fn bench_gpusigverify(bencher: &mut Bencher) { #[bench] fn bench_cpusigverify(bencher: &mut Bencher) { + let thread_pool = rayon::ThreadPoolBuilder::new() + .num_threads(get_max_thread_count()) + .thread_name(|i| format!("solEntryBench{i:02}")) + .build() + .expect("new rayon threadpool"); + let entries = (0..131072) .map(|_| { let transaction = test_tx(); @@ -89,6 +103,7 @@ fn bench_cpusigverify(bencher: &mut Bencher) { }; bencher.iter(|| { - let _ans = entry::verify_transactions(entries.clone(), Arc::new(verify_transaction)); + let _ans = + entry::verify_transactions(entries.clone(), &thread_pool, Arc::new(verify_transaction)); }) }