Change the default concurrency limit

This commit is contained in:
Omar Abdulla
2025-10-15 17:49:09 +03:00
parent f02876edbb
commit 7d3233f31d
+10 -14
View File
@@ -931,25 +931,21 @@ pub struct ConcurrencyConfiguration {
)] )]
pub number_of_threads: usize, 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. /// Note that a task limit of `0` means no limit on the number of concurrent tasks.
#[arg(long = "concurrency.number-of-concurrent-tasks")] #[arg(long = "concurrency.number-of-concurrent-tasks", default_value_t = 500)]
number_concurrent_tasks: Option<usize>, number_concurrent_tasks: usize,
/// Determines if the concurrency limit should be ignored or not.
#[arg(long = "concurrency.ignore-concurrency-limit")]
ignore_concurrency_limit: bool,
} }
impl ConcurrencyConfiguration { impl ConcurrencyConfiguration {
pub fn concurrency_limit(&self) -> Option<usize> { pub fn concurrency_limit(&self) -> Option<usize> {
match self.ignore_concurrency_limit { if self.number_concurrent_tasks == 0 {
true => None, None
false => Some( } else {
self.number_concurrent_tasks Some(self.number_concurrent_tasks)
.unwrap_or(20 * self.number_of_nodes),
),
} }
} }
} }