record_rprof: Profile R code and record Rprof samples.

Description Usage Arguments Value Examples

View source: R/record.R

Description

Run R code and record Rprof samples.

Usage

1
record_rprof(expr, rprof = tempfile(), ...)

Arguments

expr

An R expression to profile.

rprof

Path to a file with Rprof samples. Also returned from the function.

...

Additional arguments passed on to Rprof().

Value

Path to a file with Rprof samples.

Examples

1
2
3
4
if (identical(Sys.getenv("PROFFER_EXAMPLES"), "true")) {
# Returns a path to Rprof samples.
record_rprof(replicate(1e2, sample.int(1e4)))
}

proffer documentation built on July 26, 2021, 5:08 p.m.