Skip to content

Commit

Permalink
Comment to explain thread count in test pool
Browse files Browse the repository at this point in the history
  • Loading branch information
steviez committed Mar 27, 2024
1 parent 75d5c5d commit d3df7da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions entry/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,10 @@ pub fn next_versioned_entry(
}

pub fn thread_pool_for_tests() -> ThreadPool {
// Allocate fewer threads for unit tests
// Unit tests typically aren't creating massive blocks to verify, and
// multiple tests could be running in parallel so any further parallelism
// will do more harm than good
rayon::ThreadPoolBuilder::new()
.num_threads(4)
.thread_name(|i| format!("solEntryTest{i:02}"))
Expand Down

0 comments on commit d3df7da

Please sign in to comment.