MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / validate_walltime_options

Method validate_walltime_options

src/project_config/mod.rs:44–62  ·  view source on GitHub ↗

Validate walltime options for conflicting constraints

(opts: &WalltimeOptions, context: &str)

Source from the content-addressed store, hash-verified

42
43 /// Validate walltime options for conflicting constraints
44 fn validate_walltime_options(opts: &WalltimeOptions, context: &str) -> Result<()> {
45 // Check for explicitly forbidden combinations
46 if opts.min_time.is_some() && opts.max_rounds.is_some() {
47 bail!(
48 "Invalid walltime configuration in {context}: cannot use both min_time and max_rounds"
49 );
50 }
51
52 if opts.max_time.is_some() && opts.min_rounds.is_some() {
53 bail!(
54 "Invalid walltime configuration in {context}: cannot use both max_time and min_rounds"
55 );
56 }
57
58 // Note: We don't parse durations here or check min < max relationships
59 // That validation happens later in WalltimeExecutionArgs::try_from(ExecutionOptions)
60
61 Ok(())
62 }
63}
64
65#[cfg(test)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected