line_profile: Profile and parse output

Description Usage Arguments

Description

These are useful if you want to see the interim output that lineprof creates.

Usage

1
2
3
line_profile(code, interval = 0.01, torture = FALSE)

parse_prof(path)

Arguments

code

code to profile.

interval

interval, in seconds, between profile snapshots. R's timer has a resolution of at best 1 ms, so there's no reason to make this value smaller, but if you're profiling a long running function you might want to set it to something larger.

torture

if TRUE, turns on gctorture which forces gc to run after (almost) every allocation. This is useful if you want to see exactly when memory is released. It also makes R run extremely slowly (10-100x slower than usual) so it can also be useful to simulate a smaller interval.

path

path to line profiling data


hadley/lineprof documentation built on May 17, 2019, 10:42 a.m.