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

Function execute_config

src/cli/exec/mod.rs:139–157  ·  view source on GitHub ↗

Core execution logic shared by `codspeed exec` and `codspeed run` with config targets. Sets up the orchestrator and drives execution. Exec-harness installation is handled by the orchestrator when exec targets are present.

(
    config: OrchestratorConfig,
    api_client: &mut CodSpeedAPIClient,
    setup_cache_dir: Option<&Path>,
)

Source from the content-addressed store, hash-verified

137/// Sets up the orchestrator and drives execution. Exec-harness installation is handled
138/// by the orchestrator when exec targets are present.
139pub async fn execute_config(
140 config: OrchestratorConfig,
141 api_client: &mut CodSpeedAPIClient,
142 setup_cache_dir: Option<&Path>,
143) -> Result<()> {
144 ensure_exec_commands_runnable(&config.targets)?;
145
146 let orchestrator = executor::Orchestrator::new(config, api_client).await?;
147
148 if !orchestrator.is_local() {
149 super::show_banner();
150 }
151
152 debug!("config: {:#?}", orchestrator.config);
153
154 orchestrator.execute(setup_cache_dir, api_client).await?;
155
156 Ok(())
157}
158
159/// Rejects exec targets whose executable (first token) is missing or blank before
160/// the orchestrator does any setup. A blank executable otherwise surfaces only as an

Callers 2

runFunction · 0.85
runFunction · 0.85

Calls 4

show_bannerFunction · 0.85
is_localMethod · 0.80
executeMethod · 0.80

Tested by

no test coverage detected