File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
criterion_compat/criterion_fork/src/analysis
divan_compat/divan_fork/src Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ pub fn running_with_codspeed_runner() -> bool {
42
42
std:: env:: var ( "CODSPEED_ENV" ) . is_ok ( )
43
43
}
44
44
45
+ pub fn is_perf_enabled ( ) -> bool {
46
+ std:: env:: var ( "CODSPEED_PERF_ENABLED" ) . is_ok ( )
47
+ }
48
+
45
49
#[ cfg( test) ]
46
50
mod tests {
47
51
use super :: * ;
Original file line number Diff line number Diff line change @@ -305,7 +305,9 @@ mod codspeed {
305
305
uri : uri. clone ( ) ,
306
306
} )
307
307
{
308
- if codspeed:: utils:: running_with_codspeed_runner ( ) {
308
+ if codspeed:: utils:: running_with_codspeed_runner ( )
309
+ && codspeed:: utils:: is_perf_enabled ( )
310
+ {
309
311
eprintln ! ( "Failed to send benchmark URI to runner: {error:?}" ) ;
310
312
}
311
313
}
Original file line number Diff line number Diff line change @@ -438,7 +438,9 @@ mod codspeed {
438
438
uri : uri. clone ( ) ,
439
439
} )
440
440
{
441
- if codspeed:: utils:: running_with_codspeed_runner ( ) {
441
+ if codspeed:: utils:: running_with_codspeed_runner ( )
442
+ && codspeed:: utils:: is_perf_enabled ( )
443
+ {
442
444
eprintln ! ( "Failed to send benchmark URI to runner: {error:?}" ) ;
443
445
}
444
446
}
You can’t perform that action at this time.
0 commit comments