powered by
This is a wrapper around Rprof that provides results in an alternative data structure, a data.frame. The columns of the data.frame are:
Rprof
profr(expr, interval = 0.02, quiet = TRUE)
expression to profile
interval between samples (in seconds)
should output be discarded?
data.frame of class profr
data.frame
profr
name of function
level in call stack
total time (seconds) spent in function
time at which control entered function
time at which control exited function
TRUE if the function is a terminal node in the call tree, i.e. didn't call any other functions
TRUE
guess at the package that the function came from
parse_rprof to parse standalone Rprof file, plot.profr and ggplot.profr to visualise the profiling data
parse_rprof
plot.profr
ggplot.profr
# NOT RUN { glm_ex <- profr({Sys.sleep(1); example(glm)}, 0.01) head(glm_ex) summary(glm_ex) plot(glm_ex) # }
Run the code above in your browser using DataLab