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 {
4242 std:: env:: var ( "CODSPEED_ENV" ) . is_ok ( )
4343}
4444
45+ pub fn is_perf_enabled ( ) -> bool {
46+ std:: env:: var ( "CODSPEED_PERF_ENABLED" ) . is_ok ( )
47+ }
48+
4549#[ cfg( test) ]
4650mod tests {
4751 use super :: * ;
Original file line number Diff line number Diff line change @@ -305,7 +305,9 @@ mod codspeed {
305305 uri : uri. clone ( ) ,
306306 } )
307307 {
308- if codspeed:: utils:: running_with_codspeed_runner ( ) {
308+ if codspeed:: utils:: running_with_codspeed_runner ( )
309+ && codspeed:: utils:: is_perf_enabled ( )
310+ {
309311 eprintln ! ( "Failed to send benchmark URI to runner: {error:?}" ) ;
310312 }
311313 }
Original file line number Diff line number Diff line change @@ -438,7 +438,9 @@ mod codspeed {
438438 uri : uri. clone ( ) ,
439439 } )
440440 {
441- if codspeed:: utils:: running_with_codspeed_runner ( ) {
441+ if codspeed:: utils:: running_with_codspeed_runner ( )
442+ && codspeed:: utils:: is_perf_enabled ( )
443+ {
442444 eprintln ! ( "Failed to send benchmark URI to runner: {error:?}" ) ;
443445 }
444446 }
You can’t perform that action at this time.
0 commit comments