Skip to contents

Summary and suggestions

Overview and optimization recommendations

pv_help()
List available debrief functions
pv_debrief()
Comprehensive profiling data
pv_print_debrief()
Print profiling summary
pv_suggestions()
Generate optimization suggestions
pv_print_suggestions()
Print optimization suggestions

Time analysis

Function timing breakdowns

pv_self_time()
Self-time summary by function
pv_total_time()
Total time summary by function
pv_call_stats()
Call statistics summary
pv_print_call_stats()
Print call statistics

Memory analysis

Memory allocation and garbage collection

pv_memory()
Memory allocation by function
pv_memory_lines()
Memory allocation by source line
pv_print_memory()
Print memory allocation summary
pv_gc_pressure()
Detect GC pressure
pv_print_gc_pressure()
Print GC pressure analysis

Call graph analysis

Function relationships and call patterns

pv_callers()
Get callers of a function
pv_callees()
Get callees of a function
pv_print_callers_callees()
Print caller/callee analysis for a function
pv_recursive()
Detect recursive functions
pv_print_recursive()
Print recursive functions analysis
pv_call_depth()
Call depth breakdown
pv_print_call_depth()
Print call depth breakdown

Hot spots

Find where time is spent

pv_hot_lines()
Hot source lines by self-time
pv_print_hot_lines()
Print hot lines with source context
pv_worst_line()
Get the single hottest line
pv_hot_paths()
Hot call paths
pv_print_hot_paths()
Print hot paths in readable format

Visualization

Text-based flame graphs

pv_flame()
Text-based flame graph
pv_flame_condense()
Condensed flame graph

Source context

Source code and file analysis

pv_source_context()
Show source context for a specific location
pv_file_summary()
File-level time summary
pv_print_file_summary()
Print file summary
pv_focus()
Focused analysis of a specific function

Comparison

Compare profiling runs

pv_compare()
Compare two profvis profiles
pv_print_compare()
Print profile comparison
pv_compare_many()
Compare multiple profvis profiles
pv_print_compare_many()
Print comparison of multiple profiles

Export

Export results for external tools

pv_to_json()
Export profiling results as JSON
pv_to_list()
Export profiling results as a list

Example data

pv_example()
Example profvis data