bm_parallel: Benchmark in parallel

View source: R/benchmark_parallel.R

bm_parallelR Documentation

Benchmark in parallel

Description

This function runs benchmarks in parallel to test multithreading

Usage

bm_parallel(bm, runs, verbose, cores, ...)

Arguments

bm

character name of benchmark function to run from get_available_benchmarks

runs

number of runs of benchmark to make

verbose

display messages during benchmarking

cores

number of cores to benchmark. If cores is specified, the benchmark is also run for cores = 1 to allow for normalisation.

...

additional arguments to pass to bm

Examples

## Not run: 
bm_parallel("bm_matrix_cal_manip", runs = 3, verbose = TRUE, cores = 2)
bm = c("bm_matrix_cal_manip","bm_matrix_cal_power", "bm_matrix_cal_sort",
       "bm_matrix_cal_cross_product", "bm_matrix_cal_lm")
results = lapply(bm, bm_parallel,
                runs = 5, verbose = TRUE, cores = 2L)

## End(Not run)

benchmarkme documentation built on June 12, 2022, 5:06 p.m.