Implement test workload running logic

This commit is contained in:
Mubelotix
2025-08-25 13:32:34 +02:00
parent 0d8b2edfb0
commit c98efe18c9
4 changed files with 128 additions and 25 deletions

View File

@ -1,4 +1,5 @@
use clap::Parser;
use std::path::PathBuf;
pub fn default_asset_folder() -> String {
"./bench/assets/".into()
@ -10,6 +11,17 @@ pub fn default_log_filter() -> String {
#[derive(Parser, Debug, Clone)]
pub struct CommonArgs {
/// Filename of the workload file, pass multiple filenames
/// to run multiple workloads in the specified order.
///
/// For benches, each workload run will get its own report file.
#[arg(value_name = "WORKLOAD_FILE", last = false)]
pub workload_file: Vec<PathBuf>,
/// Meilisearch master keys
#[arg(long)]
pub master_key: Option<String>,
/// Directory to store the remote assets.
#[arg(long, default_value_t = default_asset_folder())]
pub asset_folder: String,
@ -21,4 +33,8 @@ pub struct CommonArgs {
/// Authentication bearer for fetching assets
#[arg(long)]
pub assets_key: Option<String>,
/// The maximum time in seconds we allow for fetching the task queue before timing out.
#[arg(long, default_value_t = 60)]
pub tasks_queue_timeout_secs: u64,
}