focus: Focus in on selected parts of the profile.

Description Usage Arguments Examples

Description

focus allows you to navigate a complicated call stack with a flexible navigation specification. auto_focus is called automatically to zoom into the file that occupies the majority of the current level - this is particularly useful for gctorture.

Usage

1
2
3
focus(x, f = NULL, filename = NULL, ref = NULL)

auto_focus(x)

Arguments

x

a line profile

f

a character vector providing a sequence of calls

filename

base name of the file

ref

a reference of the form "filename.r#lineno"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# Line profiling the profile parsing code
(x <- lineprof(parse_prof(find_ex("read-delim.prof"))))

# Zoom into line 38
(x1 <- focus(x, ref = "parse.r#38"))

# Zoom into the lapply
(x2 <- focus(x1, f = c("lapply", "FUN")))
align(x2)

# Zoom into line 21
(x3 <- focus(x2, ref = "parse-ref.r#21"))

## End(Not run)

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