diff --git a/crates/xtask/src/bench/mod.rs b/crates/xtask/src/bench/mod.rs index fdb2c4963..891742528 100644 --- a/crates/xtask/src/bench/mod.rs +++ b/crates/xtask/src/bench/mod.rs @@ -82,6 +82,10 @@ pub struct BenchDeriveArgs { /// Reason for the benchmark invocation #[arg(short, long)] reason: Option, + + /// The maximum time in seconds we allow for fetching the task queue before timing out. + #[arg(long, default_value_t = 60)] + tasks_queue_timeout_secs: u64, } pub fn run(args: BenchDeriveArgs) -> anyhow::Result<()> { @@ -127,7 +131,7 @@ pub fn run(args: BenchDeriveArgs) -> anyhow::Result<()> { let meili_client = Client::new( Some("http://127.0.0.1:7700".into()), args.master_key.as_deref(), - Some(std::time::Duration::from_secs(60)), + Some(std::time::Duration::from_secs(args.tasks_queue_timeout_secs)), )?; // enter runtime diff --git a/crates/xtask/src/main.rs b/crates/xtask/src/main.rs index b81424666..942362f4f 100644 --- a/crates/xtask/src/main.rs +++ b/crates/xtask/src/main.rs @@ -16,6 +16,7 @@ struct ListFeaturesDeriveArgs { #[command(author, version, about, long_about)] #[command(name = "cargo xtask")] #[command(bin_name = "cargo xtask")] +#[allow(clippy::large_enum_variant)] // please, that's enough... enum Command { ListFeatures(ListFeaturesDeriveArgs), Bench(BenchDeriveArgs),