@@ -5,21 +5,36 @@ timer <- purrr::partial(touchstone::benchmark_run_ref,
5
5
refs = refs , n = 10
6
6
)
7
7
8
+ styler :: cache_clear()
9
+
8
10
timer(
9
11
expr_before_benchmark = c(" library(styler)" , " cache_deactivate()" ),
10
12
without_cache = ' style_pkg("touchstone/sources/here", filetype = c("R", "rmd"))'
11
13
)
12
14
15
+ styler :: cache_clear()
16
+
13
17
timer(
14
18
expr_before_benchmark = c(" library(styler)" , " cache_activate()" ),
15
19
cache_applying = ' style_pkg("touchstone/sources/here", filetype = c("R", "rmd"))'
16
20
)
17
21
22
+ styler :: cache_clear()
23
+
18
24
timer(
19
- expr_before_benchmark = c(" library(styler)" , " gert::git_reset_hard(repo = 'touchstone/sources/here')" , " cache_activate()" ),
20
- cache_recording = ' style_pkg("touchstone/sources/here", filetype = c("R", "rmd"))'
25
+ expr_before_benchmark = c(
26
+ " library(styler)" ,
27
+ " cache_activate()"
28
+ ),
29
+ cache_recording = c(
30
+ " gert::git_reset_hard(repo = 'touchstone/sources/here')" ,
31
+ ' style_pkg("touchstone/sources/here", filetype = c("R", "rmd"))'
32
+ )
21
33
)
22
34
35
+ styler :: cache_clear()
36
+
37
+
23
38
24
39
for (benchmark in touchstone :: benchmark_ls()) {
25
40
timings <- touchstone :: benchmark_read(benchmark , refs )
@@ -40,7 +55,7 @@ for (benchmark in touchstone::benchmark_ls()) {
40
55
41
56
diff_percent <- round(100 * (tbl [refs [2 ]] - tbl [refs [1 ]]) / tbl [refs [1 ]], 1 )
42
57
cat(
43
- glue :: glue(" {benchmark}: round(tbl[refs[1]], 2)} -> {round(tbl[refs[2]], 2)} ({diff_percent}%)" ),
58
+ glue :: glue(" {benchmark}: { round(tbl[refs[1]], 2)} -> {round(tbl[refs[2]], 2)} ({diff_percent}%)" ),
44
59
fill = TRUE ,
45
60
file = " touchstone/pr-comment/info.txt" ,
46
61
append = TRUE
0 commit comments