File tree Expand file tree Collapse file tree
crates/cargo-codspeed/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -225,8 +225,10 @@ See `cargo codspeed build --help` for more information.");
225225 "-Cstrip=none" . to_owned( ) ,
226226 ] ;
227227
228- // Add the codspeed cfg flag if simulation mode is enabled
229- if measurement_mode == MeasurementMode :: Simulation {
228+ // Add the codspeed cfg flag if the benchmark should only run once
229+ if measurement_mode == MeasurementMode :: Simulation
230+ || measurement_mode == MeasurementMode :: Analysis
231+ {
230232 flags. push ( "--cfg=codspeed" . to_owned ( ) ) ;
231233 }
232234
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ pub enum MeasurementMode {
99 #[ value( alias = "instrumentation" ) ]
1010 Simulation ,
1111 Walltime ,
12+ #[ value( alias = "memory" ) ]
13+ Analysis ,
1214}
1315
1416impl fmt:: Display for MeasurementMode {
@@ -19,6 +21,7 @@ impl fmt::Display for MeasurementMode {
1921 match self {
2022 MeasurementMode :: Simulation => "simulation" ,
2123 MeasurementMode :: Walltime => "walltime" ,
24+ MeasurementMode :: Analysis => "analysis" ,
2225 }
2326 )
2427 }
You can’t perform that action at this time.
0 commit comments