From 7a17abaf9ba15117fa60d4ee2d117624d20d6ef2 Mon Sep 17 00:00:00 2001 From: Guillaume Lagrange Date: Wed, 11 Mar 2026 10:47:08 +0100 Subject: [PATCH] chore: move architecture docs out of this repo --- docs/architecture.md | 84 -------------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 docs/architecture.md diff --git a/docs/architecture.md b/docs/architecture.md deleted file mode 100644 index 6b655cc5..00000000 --- a/docs/architecture.md +++ /dev/null @@ -1,84 +0,0 @@ -# Architecture - -## Execution flow - -This diagram shows how the CLI commands, project config, orchestrator (with providers), and executors interact during a benchmark run. - -```mermaid -graph TD - subgraph "1. CLI Commands" - RUN["codspeed run <command>"] - EXEC["codspeed exec <command>"] - end - - subgraph "2. Config" - PROJ_CFG["ProjectConfig
(codspeed.yaml in repo)
benchmark targets, defaults"] - MERGER["ConfigMerger
CLI args > project config > defaults"] - end - - subgraph "3. Orchestrator" - ORCH_CFG["OrchestratorConfig
targets, modes, upload settings"] - ORCH["Orchestrator"] - - PROVIDER{" "} - LOCAL["LocalProvider"] - CI["CI Providers
(GitHub Actions, GitLab, Buildkite)"] - PROVIDER_JOIN{" "} - - subgraph "Executor (per mode × per target)" - SETUP["1. Setup"] - RUN_STEP["2. Run"] - TEARDOWN["3. Teardown"] - end - - UPLOAD["Upload all results to CodSpeed"] - end - - subgraph "4. Auth" - CS_CFG["CodSpeedConfig
(~/.config/codspeed/config.yaml)"] - OIDC["OIDC / env token"] - end - - %% CLI → Config → OrchestratorConfig - RUN --> MERGER - EXEC --> MERGER - MERGER --> PROJ_CFG - PROJ_CFG -->|"merged config"| ORCH_CFG - - %% CLI → Orchestrator - RUN -->|"single command →
Entrypoint target"| ORCH_CFG - RUN -->|"no command + config →
Exec & Entrypoint targets"| ORCH_CFG - EXEC -->|"always creates
Exec target"| ORCH_CFG - - %% Orchestrator init - ORCH_CFG -->|"Orchestrator::new()"| ORCH - - %% Provider detection - ORCH -->|"auto-detect env"| PROVIDER - PROVIDER --> LOCAL - PROVIDER --> CI - - %% Auth → Providers - CS_CFG -->|"auth token"| LOCAL - OIDC -->|"OIDC / env token"| CI - - %% Providers → Upload - LOCAL -->|"token + run metadata"| PROVIDER_JOIN{" "} - CI -->|"token + run metadata"| PROVIDER_JOIN - PROVIDER_JOIN --> UPLOAD - - %% Orchestrator spawns executors - ORCH -->|"for each target × mode:
spawn executor"| SETUP - SETUP --> RUN_STEP - RUN_STEP --> TEARDOWN - - %% All executors done → upload - TEARDOWN -->|"collect results"| UPLOAD -``` - -### Key interactions - -- **CLI → Config**: Both `run` and `exec` merge CLI args with `ProjectConfig` (CLI takes precedence). `run` can source targets from project config; `exec` always creates an `Exec` target. -- **CLI → Orchestrator**: The merged config becomes an `OrchestratorConfig` holding all targets and modes. -- **Orchestrator → Providers**: Auto-detects environment (Local vs CI). Local uses the auth token from `CodSpeedConfig`; CI providers handle OIDC tokens. -- **Orchestrator → Executors**: Groups all `Exec` targets into one exec-harness pipe command, runs each `Entrypoint` independently. For each target group, iterates over all modes, creating an `ExecutionContext` per mode and dispatching to the matching executor (`Valgrind`/`WallTime`/`Memory`). After all runs complete, uploads results with provider metadata.