From 7d3233f31d949b5fc81ab05033ba2cbf73993b0e Mon Sep 17 00:00:00 2001 From: Omar Abdulla Date: Wed, 15 Oct 2025 17:49:09 +0300 Subject: [PATCH] Change the default concurrency limit --- crates/config/src/lib.rs | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index bc2e771..e16b127 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -931,25 +931,21 @@ pub struct ConcurrencyConfiguration { )] pub number_of_threads: usize, - /// Determines the amount of concurrent tasks that will be spawned to run tests. + /// Determines the amount of concurrent tasks that will be spawned to run tests. This means that + /// at any given time there is `concurrency.number-of-concurrent-tasks` tests concurrently + /// executing. /// - /// Defaults to 10 x the number of nodes. - #[arg(long = "concurrency.number-of-concurrent-tasks")] - number_concurrent_tasks: Option, - - /// Determines if the concurrency limit should be ignored or not. - #[arg(long = "concurrency.ignore-concurrency-limit")] - ignore_concurrency_limit: bool, + /// Note that a task limit of `0` means no limit on the number of concurrent tasks. + #[arg(long = "concurrency.number-of-concurrent-tasks", default_value_t = 500)] + number_concurrent_tasks: usize, } impl ConcurrencyConfiguration { pub fn concurrency_limit(&self) -> Option { - match self.ignore_concurrency_limit { - true => None, - false => Some( - self.number_concurrent_tasks - .unwrap_or(20 * self.number_of_nodes), - ), + if self.number_concurrent_tasks == 0 { + None + } else { + Some(self.number_concurrent_tasks) } } }