ref(walltime): select profiler via typed CLI arg#379
Conversation
Align walltime profiler selection with the simulation tool pattern. Instead of parsing CODSPEED_WALLTIME_PROFILER directly inside select_profiler, expose it as a hidden, value-enum CLI argument that clap validates and thread it through the orchestrator config into WallTimeExecutor::new. This gives consistent argument handling and proper validation of the profiler value. Refs COD-2750 Co-Authored-By: Claude <noreply@anthropic.com>
Greptile SummaryThis PR refactors walltime profiler selection from ad-hoc env-var parsing inside
Confidence Score: 5/5Safe to merge — this is a clean refactor with no behavioral regression; clap now validates the profiler value instead of silently falling back on unknown input. All construction sites for OrchestratorConfig and WallTimeExecutor are updated consistently, the label-building call correctly passes None, and the actual run path correctly threads self.config.walltime_profiler through. No pre-existing env-var fallback is silently lost — the new path replicates the same platform-default logic in the None branch. No files require special attention. Important Files Changed
|
Merging this PR will not alter performance
|
Align walltime profiler selection with the existing simulation tool pattern.
Previously the walltime profiler override was read by parsing the
CODSPEED_WALLTIME_PROFILERenvironment variable directly insideselect_profiler, with a manual string match and a warning for unknownvalues. This now mirrors how
simulation_toolis handled: the override isexposed as a hidden, value-enum CLI argument (
--walltime-profiler, envCODSPEED_WALLTIME_PROFILER) that clap validates, and is threaded throughthe orchestrator config into
WallTimeExecutor::new.The result is consistent argument handling across the codebase and proper
validation of the profiler value (clap rejects unknown values instead of
silently warning and falling back).
The override lives on
OrchestratorConfigonly, notExecutorConfig: unlikesimulation_tool(read at run time inside the valgrind executor), theprofiler is selected at executor construction in the orchestrator, where
OrchestratorConfigis in scope — so anExecutorConfigfield would be dead.Refs COD-2750