Skip to content

Commit 1da6420

Browse files
better formatting, more iterations
1 parent a7ab66f commit 1da6420

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

touchstone/script.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ timings <- touchstone::benchmark_run_ref(
55
refs,
66
expr_before_benchmark = c("library(styler)", "cache_deactivate()"),
77
expr_to_benchmark = 'style_pkg("touchstone/sources/here", filetype = c("R", "rmd"))',
8-
n = 2,
8+
n = 10,
99
)
1010

1111
timings <- touchstone::benchmark_read(refs)
@@ -24,4 +24,4 @@ tbl <- timings %>%
2424
tibble::deframe()
2525

2626
diff_percent <- round(100 * (tbl[refs[2]] - tbl[refs[1]]) / tbl[refs[1]])
27-
writeLines(glue::glue("{tbl[refs[2]]} -> {tbl[refs[1]]} ({diff_percent}%)"), "touchstone/pr-comment/info.txt")
27+
writeLines(glue::glue("{round(tbl[refs[1]], 2)} -> {round(tbl[refs[2]], 2)} ({diff_percent}%)"), "touchstone/pr-comment/info.txt")

0 commit comments

Comments
 (0)