diff --git a/Project.toml b/Project.toml index b76eeb0..d35fe0f 100644 --- a/Project.toml +++ b/Project.toml @@ -7,6 +7,7 @@ version = "2.2.2" AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56" FlameGraphs = "08572546-2f56-4bcf-ba4e-bab62c3a3f89" +Graphviz_jll = "3c863552-8265-54e4-a6dc-903eb78fde85" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" diff --git a/README.md b/README.md index 89490f0..82f834b 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,6 @@ This prints a link to a local webserver where you can inspect the profile you've For more usage examples see the pprof docs: https://github.com/google/pprof/blob/master/doc/README.md -## Dependencies -- [Graphviz](https://www.graphviz.org/) - - In order to use pprof's web graph view (which is one of the best parts of pprof), you need to have graphviz installed. Click the above link to install. - ## Usage ```julia help?> pprof diff --git a/src/PProf.jl b/src/PProf.jl index 03b5b15..91299f1 100644 --- a/src/PProf.jl +++ b/src/PProf.jl @@ -6,6 +6,7 @@ using Profile using ProtoBuf using OrderedCollections import pprof_jll +import Graphviz_jll using Profile: clear @@ -326,7 +327,9 @@ function refresh(; webhost::AbstractString = "localhost", relative_percentages_flag = ui_relative_percentages ? "-relative_percentages" : "" proc[] = pprof_jll.pprof() do pprof_path - open(pipeline(`$pprof_path -http=$webhost:$webport $relative_percentages_flag $file`)) + Graphviz_jll.dot() do dot_path + open(pipeline(`$pprof_path -http=$webhost:$webport $relative_percentages_flag $file`)) + end end end