Closed Crispy13 closed 1 month ago
Solved it with a dummy funtion
fn set_thread_pool(c: &mut Criterion) {
static ONCE:Once = Once::new();
ONCE.call_once(||
rayon::ThreadPoolBuilder::new().num_threads(4).build().unwrap()
);
}
criterion_group!(benches, set_thread_pool, ...)
...
It seems that criterion uses all threads available.
Can I limit it? I must use a part of resources in server.