We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51df68c commit 52ae455Copy full SHA for 52ae455
touchstone/script.R
@@ -5,7 +5,7 @@ timings <- touchstone::benchmark_run_ref(
5
refs,
6
expr_before_benchmark = c("library(styler)", "cache_deactivate()"),
7
expr_to_benchmark = 'style_pkg("touchstone/sources/here", filetype = c("R", "rmd"))',
8
- n = 1,
+ n = 2,
9
)
10
11
timings <- touchstone::benchmark_read(refs)
@@ -17,3 +17,11 @@ timings %>%
17
geom_density()
18
19
ggsave("touchstone/plots/density.png")
20
+
21
+tbl <- timings %>%
22
+ dplyr::group_by(.data$ref) %>%
23
+ dplyr::summarise(m = mean(.data$elapsed)) %>%
24
+ tibble::deframe()
25
26
+diff_percent <- round(100 * (tbl[ref[2]] - tbl[ref[1]]) / tbl[ref[1]])
27
+writeLines(glue::glue('{tbl[ref[2]]} -> {tbl[ref[1]]} ({diff_percent}%)'), 'touchstone/pr-comment/info.txt')
0 commit comments