Identifies functions that call themselves (directly recursive) or appear multiple times in the same call stack. Recursive functions in hot paths are often optimization targets.
Value
A data frame with columns:
label: Function namemax_depth: Maximum recursion depth observedavg_depth: Average recursion depth when recursiverecursive_samples: Number of samples where function appears multiple timestotal_samples: Total samples where function appearspct_recursive: Percentage of appearances that are recursivetotal_ms: Total time on call stackpct_time: Percentage of total profile time
Examples
p <- pv_example("recursive")
pv_recursive(p)
#> label max_depth avg_depth recursive_samples total_samples pct_recursive
#> 1 recurse 5 4 3 3 100
#> total_ms pct_time
#> 1 30 100
