Skip to content

Commit ec51047

Browse files
nicer rounding
1 parent 1109d90 commit ec51047

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bench/01-declarations.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ plot_against_base <- function(new_bm,
2727
new_bm <- dplyr::bind_rows(reference, new_bm)
2828
stopifnot(nrow(new_bm) == 2)
2929
diff_in_percent <- round(100 * diff(new_bm$p50) / new_bm$p50[1])
30-
pr_comment <- glue::glue("* {name}: {new_bm$p50[1]} -> {new_bm$p50[2]} ({diff_in_percent}%)\n")
31-
cat(pr_comment, file = "pr-comment/info.txt", append = TRUE)
30+
pr_comment <- glue::glue("* {name}: {round(new_bm$p50[1], 3)} -> {round(new_bm$p50[2], 3)} ({diff_in_percent}%)")
31+
cat(pr_comment, file = "pr-comment/info.txt", sep = "\n", append = TRUE)
3232
}
3333
}
3434
}

0 commit comments

Comments
 (0)