Returns the most common complete call stacks. This shows which execution paths through the code consume the most time.
Value
A data frame with columns:
stack: The call path (functions separated by arrows)samples: Number of profiling samples with this exact pathtime_ms: Time in millisecondspct: Percentage of total time
Examples
p <- pv_example()
pv_hot_paths(p)
#> stack
#> 1 process_data -> generate_data (example_code.R:5) -> rnorm (example_code.R:13)
#> 2 process_data -> generate_data (example_code.R:5) -> x[i] <- rnorm(1) (example_code.R:13)
#> 3 process_data -> generate_data (example_code.R:5)
#> 4 process_data -> transform_data (example_code.R:6) -> result[i] <- sqrt(abs(x[i])) * 2 (example_code.R:21)
#> samples time_ms pct
#> 1 6 30 42.9
#> 2 4 20 28.6
#> 3 3 15 21.4
#> 4 1 5 7.1
