Returns memory allocation aggregated by source location. Requires source
references (use devtools::load_all() for best results).
Value
A data frame with columns:
location: File path and line numberlabel: Function name at this locationfilename: Source file pathlinenum: Line numbermem_mb: Memory allocated in megabytes
Examples
p <- pv_example()
pv_memory_lines(p)
#> location mem_mb label filename
#> 1 example_code.R:13 2.6303101 rnorm example_code.R
#> 2 example_code.R:5 0.5630035 generate_data example_code.R
#> 3 example_code.R:21 0.3564835 result[i] <- sqrt(abs(x[i])) * 2 example_code.R
#> linenum
#> 1 13
#> 2 5
#> 3 21
