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

Function get_bench_command

src/executor/helpers/get_bench_command.rs:4–14  ·  view source on GitHub ↗
(config: &ExecutorConfig)

Source from the content-addressed store, hash-verified

2use crate::prelude::*;
3
4pub fn get_bench_command(config: &ExecutorConfig) -> Result<String> {
5 let bench_command = &config.command.trim();
6
7 if bench_command.is_empty() {
8 bail!("The bench command is empty");
9 }
10
11 Ok(bench_command
12 // Fixes a compatibility issue with cargo 1.66+ running directly under valgrind <3.20
13 .replace("cargo codspeed", "cargo-codspeed"))
14}
15
16#[cfg(test)]
17mod tests {

Callers 3

walltime_bench_cmdMethod · 0.85
measureFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected