Skip to content

Commit 72f283d

Browse files
committed
fix: only display pipe error in CODSPEED_ENV
1 parent 9114511 commit 72f283d

File tree

2 files changed

+6
-2
lines changed
  • crates
    • criterion_compat/criterion_fork/src/analysis
    • divan_compat/divan_fork/src

2 files changed

+6
-2
lines changed

crates/criterion_compat/criterion_fork/src/analysis/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ mod codspeed {
301301
pid: std::process::id(),
302302
uri: uri.clone(),
303303
}) {
304-
eprintln!("Failed to send benchmark URI to runner: {}", error);
304+
if std::env::var("CODSPEED_ENV").is_ok() {
305+
eprintln!("Failed to send benchmark URI to runner: {error:?}");
306+
}
305307
}
306308

307309
let avg_iter_per_round = iters.iter().sum::<f64>() / iters.len() as f64;

crates/divan_compat/divan_fork/src/divan.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,9 @@ mod codspeed {
432432
pid: std::process::id(),
433433
uri: uri.clone(),
434434
}) {
435-
eprintln!("Failed to send benchmark URI to runner: {}", error);
435+
if std::env::var("CODSPEED_ENV").is_ok() {
436+
eprintln!("Failed to send benchmark URI to runner: {error:?}");
437+
}
436438
}
437439

438440
::codspeed::walltime::collect_raw_walltime_results(

0 commit comments

Comments
 (0)