Skip to content

Allow multiple runner modes in a single codspeed cli run#259

Merged
GuillaumeLagrange merged 4 commits intomainfrom
cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run
Mar 6, 2026
Merged

Allow multiple runner modes in a single codspeed cli run#259
GuillaumeLagrange merged 4 commits intomainfrom
cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run

Conversation

@GuillaumeLagrange
Copy link
Contributor

@GuillaumeLagrange GuillaumeLagrange commented Mar 5, 2026

Summary

  • Consolidate poll_results into upload module: merged the two separate poll_results implementations from cli/exec and cli/run into a single upload::poll_results function driven by PollResultsOptions
  • Add local_data to upload metadata: new LocalData struct carrying expected_run_parts_count; local runs now provide a stable run_id and a per-executor run_part_id in the upload metadata
  • Introduce Orchestrator for multi-mode execution: new Orchestrator struct owns shared state (provider, system_info, logger) and drives the full lifecycle — setup → run all modes in sequence (each with its own profile folder) → upload all results → poll; mode CLI arg and shell session now accept Vec<RunnerMode> (comma-separated or space-separated)

Test plan

  • cargo test passes
  • codspeed run --mode simulation cargo bench still works as before
  • codspeed run --mode simulation,walltime cargo bench runs both modes and uploads two run parts

@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run branch from db0e697 to b50b7fe Compare March 5, 2026 09:02
@GuillaumeLagrange GuillaumeLagrange marked this pull request as ready for review March 5, 2026 09:02
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 5, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run (79ac610) with main (5730358)

Open in CodSpeed

@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run branch 3 times, most recently from 93e2f15 to 6bc3257 Compare March 5, 2026 11:01
@GuillaumeLagrange GuillaumeLagrange marked this pull request as draft March 5, 2026 11:19
This avoids triggering an error if the repository is not enabled
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run branch from 6bc3257 to 250c25d Compare March 5, 2026 11:20
Merge the two separate `poll_results` implementations from
`cli/exec` and `cli/run` into a single `upload::poll_results`
function controlled by `PollResultsOptions`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run branch 2 times, most recently from 37e4c22 to c0bd650 Compare March 5, 2026 12:04
@GuillaumeLagrange GuillaumeLagrange marked this pull request as ready for review March 5, 2026 13:47
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run branch from c0bd650 to 28538b2 Compare March 5, 2026 14:12
Add a `local_data` field to `RunEnvironmentMetadata` to carry
local-run specific information (expected run parts count).
Also populate `run_part` for local runs with a stable run_id
and per-executor run_part_id.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run branch from 28538b2 to c6bd1f1 Compare March 5, 2026 14:12
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run branch 4 times, most recently from 72e3286 to 16a85cd Compare March 6, 2026 08:32
Add an Orchestrator struct that owns the shared run-time state
(provider, system_info, logger) and drives the full execution
lifecycle: setup → run all modes → upload all results → poll.

This replaces the monolithic ExecutionContext with a leaner per-mode
context, and wires up the mode/shell-session APIs to accept Vec<RunnerMode>
so that multiple modes can be requested in a single CLI invocation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run branch from 16a85cd to 79ac610 Compare March 6, 2026 08:34
@GuillaumeLagrange GuillaumeLagrange merged commit 79ac610 into main Mar 6, 2026
17 checks passed
@GuillaumeLagrange GuillaumeLagrange deleted the cod-1907-multiple-runner-modes-in-a-single-codspeed-cli-run branch March 6, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants