pub struct BenchConfig {Show 20 fields
pub model: String,
pub runs: usize,
pub concurrency: usize,
pub workload: Option<String>,
pub output_format: OutputFormat,
pub output_path: Option<PathBuf>,
pub warmup: usize,
pub save_baseline: bool,
pub check_regression: bool,
pub tolerance: f64,
pub external_frameworks: Vec<ExternalFrameworkConfig>,
pub external_timeout_secs: u64,
pub concurrency_sweep: Option<Vec<usize>>,
pub memory_sample_interval_ms: u64,
pub suite: Option<TaskSuite>,
pub baseline_path: PathBuf,
pub dry_run: bool,
pub max_cost_usd: Option<f64>,
pub confirm_cost: bool,
pub experimental: bool,
}Expand description
Top-level benchmark configuration mapped from CLI flags.
Controls all aspects of benchmark execution including iteration count, concurrency, output format, regression detection, and cost guards.
§Example
use adk_bench::BenchConfig;
let config = BenchConfig {
model: "gemini-2.5-flash".to_string(),
runs: 10,
concurrency: 4,
..Default::default()
};
assert_eq!(config.runs, 10);
assert_eq!(config.warmup, 3);Fields§
§model: StringModel identifier (e.g., “gemini-2.5-flash”).
runs: usizeNumber of measurement iterations per workload.
concurrency: usizeAgent concurrency level (1 = sequential).
workload: Option<String>Specific workload to run (None = all built-in).
output_format: OutputFormatOutput format for results.
output_path: Option<PathBuf>Output file path (None = stdout).
warmup: usizeWarm-up iterations before measurement begins (discarded).
save_baseline: boolWhether to save results as baseline after the run.
check_regression: boolWhether to check regression against a saved baseline.
tolerance: f64Maximum allowed relative degradation (default 0.10 = 10%).
external_frameworks: Vec<ExternalFrameworkConfig>External framework configurations for comparison.
external_timeout_secs: u64Timeout for external framework runs in seconds.
concurrency_sweep: Option<Vec<usize>>Concurrency sweep levels (if sweep mode enabled). When set, the runner tests each level sequentially: e.g., [1, 2, 4, 8, 16, 32, 64].
memory_sample_interval_ms: u64Memory sampling interval in milliseconds.
suite: Option<TaskSuite>Task quality suite to run (tau2, bfcl).
baseline_path: PathBufBaseline file path for regression detection.
dry_run: boolDry-run mode: compute and display estimated cost without executing API calls.
max_cost_usd: Option<f64>Maximum allowed API cost in USD; abort if estimated cost exceeds this.
confirm_cost: boolSkip interactive cost confirmation (auto-confirm when estimated cost > $1.00).
experimental: boolEnable experimental workloads (e.g., multi-agent delegation).
Trait Implementations§
Source§impl Clone for BenchConfig
impl Clone for BenchConfig
Source§fn clone(&self) -> BenchConfig
fn clone(&self) -> BenchConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BenchConfig
impl Debug for BenchConfig
Source§impl Default for BenchConfig
impl Default for BenchConfig
Source§fn default() -> Self
fn default() -> Self
Creates a BenchConfig with documented defaults:
model:"gemini-2.5-flash"runs: 5concurrency: 1 (sequential)warmup: 3tolerance: 0.10 (10%)external_timeout_secs: 300memory_sample_interval_ms: 100output_format: Tablebaseline_path:.bench-baseline.jsondry_run: falsemax_cost_usd: Noneconfirm_cost: falseexperimental: false