a simple benchmark/profiling tool for R scripts.
Usage:
benchmarkSource("/location/of/R/script.R")
benchmarkSource("/location/of/R/script.R",timed_fun = data.frame(fun,pkg,prc,typ))
installs all packages used by the script
returns the runningtime of the R script provided
prints the benchmarking details to the console
benchmarkSource("/location/of/R/script.R", dt)
# dt is a data.frame that contains packages/functions that should be profiled
# columns: fun, pkg, process, type
# example:
# dt <- data.frame(
# fun = c("fread"),
# pkg = c("data.table"),
# prc = c("READ"),
# typ = c("IO")
# )
functions as previous example but times the provided functions and outputs/returns runningtime of the script minus timed used by profiled functions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.