treeprof: Profile with Rprof and Display As Tree

Description Usage Arguments Value Note

View source: R/profiler.R

Description

Uses RProf to profile an expression which will be repeatedly evaluated until target execution time is met.

treeprof

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
treeprof(expr = NULL, target.time = 5, times = NULL, interval = 0.001,
<<<<<<< HEAD
<<<<<<< HEAD
  file = NULL, eval.frame = parent.frame(), gc.torture = FALSE,
  verbose = TRUE)
=======
  file = NULL, eval.frame = parent.frame(), gc.torture = FALSE)
>>>>>>> 75d32eb92dbce607391b8bcf59be3a129015cdd0
=======
  file = NULL, eval.frame = parent.frame(), gc.torture = FALSE,
  verbose = TRUE)
>>>>>>> 2a504db3379c01ea7079dc7c05a7fc2800124694

Arguments

expr

expression to profile

interval

numeric to dump stack at, NULL to auto-select (see notes)

target.time

numeric number of seconds to run benchmark for; this is an approximate suggestion and only holds when the expression excutes faster than the `target.time`.

times

integer how many times to run the expression; if this is set to a value other than null parameter `target.time` is ignored

eval.fame

an environment to evaluate `expr` in

gc.torture

whether to enable `gctorture`, note that this should not be necessary since `treeprof` automatically re-runs a function enough times to get reasonable resolution; you will get more stable results by running the same function thousands of times than by using 'gctorture' to slow it down by 10-1000x and just running it a couple of times.

<<<<<<< HEAD <<<<<<< HEAD

verbose

logical(1L) whether to output status to screen

======= >>>>>>> 75d32eb92dbce607391b8bcf59be3a129015cdd0 =======

verbose

logical(1L) whether to output status to screen

>>>>>>> 2a504db3379c01ea7079dc7c05a7fc2800124694

Value

a treeprof object, which is really just a 'data.table' with some attributes attached

Note

timings are approximate as there is some small overhead to manage the repeated tests


brodieG/treeprof documentation built on Nov. 11, 2021, 1:36 a.m.