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

Function get_executor_from_mode

src/executor/mod.rs:48–59  ·  view source on GitHub ↗
(
    mode: &RunnerMode,
    walltime_profiler: Option<WalltimeProfiler>,
)

Source from the content-addressed store, hash-verified

46pub const EXECUTOR_TARGET: &str = "executor";
47
48pub fn get_executor_from_mode(
49 mode: &RunnerMode,
50 walltime_profiler: Option<WalltimeProfiler>,
51) -> Box<dyn Executor> {
52 match mode {
53 #[allow(deprecated)]
54 RunnerMode::Instrumentation | RunnerMode::Simulation => Box::new(ValgrindExecutor),
55 RunnerMode::Walltime => Box::new(WallTimeExecutor::new(walltime_profiler)),
56 #[cfg(target_os = "linux")]
57 RunnerMode::Memory => Box::new(MemoryExecutor),
58 }
59}
60
61pub fn get_all_executors() -> Vec<Box<dyn Executor>> {
62 #[cfg_attr(not(target_os = "linux"), allow(unused_mut))]

Callers 2

get_executors_from_modesFunction · 0.85
executeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected