Closed
Description
Hi, and thank you for the awesome new allocation profiler!
I feel like it is not obvious from the documentation (manual page and API reference) how to retrieve and visualize the results from Profile.Allocs.@profile
.
PProf.jl is mentioned, but not the specific function we need to call (PProf.Allocs.pprof
). I think it would make sense to describe an example workflow in the manual (see below).
In addition, I guess users would be interested to know if there is any visualization (eg. @profview
) or pretty-printing (eg. Profile.print()
) method that works directly in the REPL / VSCode / Pluto.
julia> using Profile, PProf
julia> Profile.Allocs.clear()
julia> peakflops(); Profile.Allocs.@profile sample_rate=1 peakflops()
6.474132101420371e10
julia> results = Profile.Allocs.fetch();
julia> PProf.Allocs.pprof(results; from_c=false)
Analyzing 11 allocation samples... 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| Time: 0:00:00
Main binary filename not available.
Serving web UI on http://localhost:62261
"alloc-profile.pb.gz"