#' Run benchmark
#'
#' @description
#' Function runs benchmark after processing user's command.
#' By default function saves benchmark output to RDS file.
#' @export
benchy = function() {
command =
parse_command() %T>%
process_command()
cli::cli_h1("Loading benchmark config")
config_options =
yaml::read_yaml(command$options$config) %T>%
show_config()
cli::cli_h1("Loading algorithms")
source_dir()
config_options$methods %>%
find_methods()
cli::cli_h1("Starting benchmark")
cli::cli_alert_warning("Are you sure about running benchmark with given config? y/n")
choice = readLines(file("stdin"), n = 1)
if(choice == "y") {
config_options$methods %>%
purrr::map(function(method) {
cli::cli_h2("{method} is running... (it may take a while, ba patient!)")
Sys.sleep(5)
1
})
}
else
cli::cli_alert_danger("Benchmark aborted.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.