Skip to content

Commit bd91957

Browse files
feat: display N/A rather than NaN/inf in the benchmarks results table
1 parent 294a5e4 commit bd91957

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/upload/benchmark_display.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ fn format_with_thousands_sep(n: u64) -> String {
2929

3030
/// Format StdDev with color coding based on value
3131
fn format_stdev_colored(stdev_pct: f64) -> String {
32+
if !stdev_pct.is_finite() {
33+
return format!("{}", style("N/A").dim());
34+
}
3235
let formatted = format!("{stdev_pct:.2}%");
3336
if stdev_pct <= 2.0 {
3437
format!("{}", style(&formatted).green())

0 commit comments

Comments
 (0)