From 92f25c7536f44d8a3db31733891d08af9389ef72 Mon Sep 17 00:00:00 2001 From: not-matthias Date: Mon, 20 Jul 2026 15:14:56 +0200 Subject: [PATCH] feat: enable cycle estimation and allocation exclusion by default Graduate --cycle-estimation and --exclude-allocations out of the experimental flag set. They are now normal, default-on options that can be disabled with --cycle-estimation=false / --exclude-allocations=false (env: CODSPEED_CYCLE_ESTIMATION, CODSPEED_EXCLUDE_ALLOCATIONS). --experimental-fair-sched remains experimental. --- src/cli/exec/mod.rs | 4 ++-- src/cli/experimental.rs | 24 ------------------------ src/cli/run/mod.rs | 8 ++++---- src/cli/shared.rs | 24 ++++++++++++++++++++++++ src/executor/config.rs | 4 ++-- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/cli/exec/mod.rs b/src/cli/exec/mod.rs index cefe5c75..8022f9b9 100644 --- a/src/cli/exec/mod.rs +++ b/src/cli/exec/mod.rs @@ -89,8 +89,8 @@ fn build_orchestrator_config( poll_results_options, extra_env: HashMap::new(), fair_sched: args.shared.experimental.experimental_fair_sched, - cycle_estimation: args.shared.experimental.experimental_cycle_estimation, - exclude_allocations: args.shared.experimental.experimental_exclude_allocations, + cycle_estimation: args.shared.cycle_estimation, + exclude_allocations: args.shared.exclude_allocations, }) } diff --git a/src/cli/experimental.rs b/src/cli/experimental.rs index b38b9e47..fdebba20 100644 --- a/src/cli/experimental.rs +++ b/src/cli/experimental.rs @@ -16,24 +16,6 @@ pub struct ExperimentalArgs { env = "CODSPEED_EXPERIMENTAL_FAIR_SCHED" )] pub experimental_fair_sched: bool, - - /// Enable Valgrind cycle estimation (--cycle-estimation) in simulation mode. - #[arg( - long, - default_value_t = false, - help_heading = "Experimental", - env = "CODSPEED_EXPERIMENTAL_CYCLE_ESTIMATION" - )] - pub experimental_cycle_estimation: bool, - - /// Exclude memory allocation time from simulation results. - #[arg( - long, - default_value_t = false, - help_heading = "Experimental", - env = "CODSPEED_EXPERIMENTAL_EXCLUDE_ALLOCATIONS" - )] - pub experimental_exclude_allocations: bool, } impl ExperimentalArgs { @@ -43,12 +25,6 @@ impl ExperimentalArgs { if self.experimental_fair_sched { flags.push("--experimental-fair-sched"); } - if self.experimental_cycle_estimation { - flags.push("--experimental-cycle-estimation"); - } - if self.experimental_exclude_allocations { - flags.push("--experimental-exclude-allocations"); - } flags } diff --git a/src/cli/run/mod.rs b/src/cli/run/mod.rs index 03058fd0..86ca6ad0 100644 --- a/src/cli/run/mod.rs +++ b/src/cli/run/mod.rs @@ -69,6 +69,8 @@ impl RunArgs { go_runner_version: None, show_full_output: false, base: None, + cycle_estimation: true, + exclude_allocations: true, profiler_run_args: ProfilerRunArgs { enable_profiler: false, enable_perf: None, @@ -78,8 +80,6 @@ impl RunArgs { }, experimental: ExperimentalArgs { experimental_fair_sched: false, - experimental_cycle_estimation: false, - experimental_exclude_allocations: false, }, }, instruments: vec![], @@ -129,8 +129,8 @@ fn build_orchestrator_config( poll_results_options, extra_env: HashMap::new(), fair_sched: args.shared.experimental.experimental_fair_sched, - cycle_estimation: args.shared.experimental.experimental_cycle_estimation, - exclude_allocations: args.shared.experimental.experimental_exclude_allocations, + cycle_estimation: args.shared.cycle_estimation, + exclude_allocations: args.shared.exclude_allocations, }) } diff --git a/src/cli/shared.rs b/src/cli/shared.rs index c697881f..3eea85f0 100644 --- a/src/cli/shared.rs +++ b/src/cli/shared.rs @@ -113,6 +113,30 @@ pub struct ExecAndRunSharedArgs { #[arg(long)] pub base: Option, + /// Enable Valgrind cycle estimation (--cycle-estimation) in simulation mode. + #[arg( + long, + env = "CODSPEED_CYCLE_ESTIMATION", + default_value_t = true, + default_missing_value = "true", + num_args = 0..=1, + require_equals = true, + action = clap::ArgAction::Set + )] + pub cycle_estimation: bool, + + /// Exclude memory allocation time from simulation results. + #[arg( + long, + env = "CODSPEED_EXCLUDE_ALLOCATIONS", + default_value_t = true, + default_missing_value = "true", + num_args = 0..=1, + require_equals = true, + action = clap::ArgAction::Set + )] + pub exclude_allocations: bool, + #[command(flatten)] pub profiler_run_args: ProfilerRunArgs, diff --git a/src/executor/config.rs b/src/executor/config.rs index cb7e014b..77f2344e 100644 --- a/src/executor/config.rs +++ b/src/executor/config.rs @@ -235,8 +235,8 @@ impl OrchestratorConfig { poll_results_options: PollResultsOptions::new(false, None), extra_env: HashMap::new(), fair_sched: false, - cycle_estimation: false, - exclude_allocations: false, + cycle_estimation: true, + exclude_allocations: true, } } }