profr {profr}R Documentation

profr

Description

Profile the performance of function call.

Usage

profr(expr, interval = 0.02, quiet = TRUE)

Arguments

expr expression to profile
interval interval between samples (in seconds)
quiet should output be discarded?

Details

This is a wrapper around Rprof that provides results in an alternative data structure, a data.frame. The columns of the data.frame are:

f
name of function
level
level in call stack
time
total time (seconds) spent in function
start
time at which control entered function
end
time at which control exited function
leaf
TRUE if the function is a terminal node in the call tree, i.e. didn't call any other functions
source
guess at the package that the function came from

Value

data.frame of class profr

Author(s)

Hadley Wickham <h.wickham@gmail.com>

See Also

parse_rprof to parse standalone Rprof file, plot.profr and ggplot.profr to visualise the profiling data

Examples

glm_ex <- profr(example(glm))
head(glm_ex)
summary(glm_ex)
plot(glm_ex)

[Package profr version 0.1.1 Index]