diff --git a/bench/01-declarations.R b/bench/01-declarations.R index 1fbebaf0b..a0c7e8df4 100644 --- a/bench/01-declarations.R +++ b/bench/01-declarations.R @@ -26,6 +26,10 @@ plot_against_base <- function(new_bm, new_bm <- dplyr::bind_rows(reference, new_bm) stopifnot(nrow(new_bm) == 2) diff_in_percent <- round(100 * diff(new_bm$p50) / new_bm$p50[1]) + diff_in_percent <- ifelse(diff_in_percent > 0, + paste0("+", diff_in_percent), + diff_in_percent + ) pr_comment <- glue::glue("* {name}: {round(new_bm$p50[1], 3)} -> {round(new_bm$p50[2], 3)} ({diff_in_percent}%)") cat(pr_comment, file = "pr-comment/info.txt", sep = "\n", append = TRUE) }