@@ -18,6 +18,7 @@ plot_against_base <- function(new_bm,
18
18
# if a pull request
19
19
reference <- bm [commit_is_reference , " benchmarks" ][[1 ]][[1 ]]
20
20
# if benchmark exists in base branch
21
+ <<<<<<< HEAD
21
22
if (" name" %in% names(reference )) {
22
23
reference <- reference %> %
23
24
dplyr :: filter(.data $ name %in% !! name )
@@ -30,6 +31,22 @@ plot_against_base <- function(new_bm,
30
31
pr_comment <- glue :: glue(" * {name}: {round(new_bm$p50[1], 3)} -> {round(new_bm$p50[2], 3)} ({diff_in_percent}%)" )
31
32
cat(pr_comment , file = " pr-comment/info.txt" , sep = " \n " , append = TRUE )
32
33
}
34
+ =======
35
+ reference <- reference %> %
36
+ dplyr :: filter(.data $ name %in% !! name )
37
+ if (nrow(reference ) > 0 ) {
38
+ # if benchmark exists in base branch
39
+ reference $ expression <- bench ::: new_bench_expr(Sys.getenv(" GITHUB_BASE_REF" ))
40
+ new_bm <- dplyr :: bind_rows(reference , new_bm )
41
+ stopifnot(nrow(new_bm ) == 2 )
42
+ diff_in_percent <- round(100 * diff(new_bm $ p50 ) / new_bm $ p50 [1 ])
43
+ diff_in_percent <- ifelse(diff_in_percent > 0 ,
44
+ paste0(" +" , diff_in_percent ),
45
+ diff_in_percent
46
+ )
47
+ pr_comment <- glue :: glue(" * {name}: {round(new_bm$p50[1], 3)} -> {round(new_bm$p50[2], 3)} ({diff_in_percent}%)" )
48
+ cat(pr_comment , file = " pr-comment/info.txt" , sep = " \n " , append = TRUE )
49
+ >>>>>>> show + if positive
33
50
}
34
51
}
35
52
new_bm $ branch <- factor (new_bm $ expression )
0 commit comments