Turn raw benchmark results into text and figures

benchmark_analyze(
  branches = c(branch_get_or_fail("GITHUB_BASE_REF"),
    branch_get_or_fail("GITHUB_HEAD_REF")),
  names = NULL,
  ci = 0.95,
  sorting = c("script", "name", "performance_improvement",
    "performance_regression", "current_running_time", "incoming_running_time")
)

Arguments

branches

The names of the branches for which analysis should be created.

names

The names of the benchmarks to analyze. If NULL, all benchmarks with the branches are taken.

ci

The confidence level, defaults to 95%.

sorting

How to order the rows of the table:

  • "script": in the order in which the benchmarks were run with benchmark_run(), i.e. the order of the touchstone script. Benchmarks not run in that way come last, alphabetically.

  • "name": alphabetically by benchmark name.

  • "performance_improvement": strongest decrease in running time first.

  • "performance_regression": strongest increase in running time first.

  • "current_running_time": largest running time on the base branch first.

  • "incoming_running_time": largest running time on the head branch first.

The relative change used for the performance options is the midpoint of the confidence interval.

Value

A character vector that summarizes the benchmarking results.

Details

Creates two side effects:

  • Density plots for each element in branches are written to touchstone/plots.

  • A Markdown table explaining the speed diff, with one row for every registered benchmarking expression, is written to touchstone/pr-comment/info.txt. See vignette("inference", package = "touchstone") for details.

Requires dplyr::dplyr, ggplot2::ggplot2 and glue::glue.