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

Function get_executor_from_mode

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

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls