File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,14 @@ impl TryFrom<RunArgs> for Config {
7272 let upload_url = Url :: parse ( & raw_upload_url)
7373 . map_err ( |e| anyhow ! ( "Invalid upload URL: {raw_upload_url}, {e}" ) ) ?;
7474
75+ // Emit deprecation warning if using "instrumentation" mode
76+ if args. mode == RunnerMode :: Instrumentation {
77+ warn ! (
78+ "The 'instrumentation' runner mode is deprecated and will be removed in a future version. \
79+ Please use 'simulation' instead."
80+ ) ;
81+ }
82+
7583 Ok ( Self {
7684 upload_url,
7785 token : args. token ,
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ pub struct RunArgs {
138138#[ serde( rename_all = "lowercase" ) ]
139139pub enum RunnerMode {
140140 Instrumentation ,
141+ Simulation ,
141142 Walltime ,
142143}
143144
Original file line number Diff line number Diff line change @@ -6,6 +6,14 @@ pub fn get_base_injected_env(
66 mode : RunnerMode ,
77 profile_folder : & Path ,
88) -> HashMap < & ' static str , String > {
9+ let runner_mode_internal_env_value = match mode {
10+ RunnerMode :: Instrumentation => "instrumentation" ,
11+ // While the runner now deprecates the usage of instrumentation with a message, we
12+ // internally still use instrumentation temporarily to give time to users to upgrade their
13+ // integrations to a version that accepts both instrumentation and simulation.
14+ RunnerMode :: Simulation => "instrumentation" ,
15+ RunnerMode :: Walltime => "walltime" ,
16+ } ;
917 HashMap :: from ( [
1018 ( "PYTHONHASHSEED" , "0" . into ( ) ) ,
1119 (
@@ -18,7 +26,10 @@ pub fn get_base_injected_env(
1826 ) ,
1927 ( "ARCH" , ARCH . into ( ) ) ,
2028 ( "CODSPEED_ENV" , "runner" . into ( ) ) ,
21- ( "CODSPEED_RUNNER_MODE" , mode. to_string ( ) ) ,
29+ (
30+ "CODSPEED_RUNNER_MODE" ,
31+ runner_mode_internal_env_value. into ( ) ,
32+ ) ,
2233 (
2334 "CODSPEED_PROFILE_FOLDER" ,
2435 profile_folder. to_string_lossy ( ) . to_string ( ) ,
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ impl Display for RunnerMode {
2222 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
2323 match self {
2424 RunnerMode :: Instrumentation => write ! ( f, "instrumentation" ) ,
25+ RunnerMode :: Simulation => write ! ( f, "simulation" ) ,
2526 RunnerMode :: Walltime => write ! ( f, "walltime" ) ,
2627 }
2728 }
@@ -32,6 +33,7 @@ pub const EXECUTOR_TARGET: &str = "executor";
3233pub fn get_executor_from_mode ( mode : & RunnerMode ) -> Box < dyn Executor > {
3334 match mode {
3435 RunnerMode :: Instrumentation => Box :: new ( ValgrindExecutor ) ,
36+ RunnerMode :: Simulation => Box :: new ( ValgrindExecutor ) ,
3537 RunnerMode :: Walltime => Box :: new ( WallTimeExecutor :: new ( ) ) ,
3638 }
3739}
You can’t perform that action at this time.
0 commit comments