From 40bc913256f3ac3743ed12a60765d13e29880916 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 10 Oct 2022 23:22:23 +0200 Subject: [PATCH] Use Graphviz_jll This removes the need to manually install Graphviz --- Project.toml | 2 ++ README.md | 4 ---- src/PProf.jl | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index d735e45..ef6551e 100644 --- a/Project.toml +++ b/Project.toml @@ -8,6 +8,7 @@ AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193" 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" @@ -20,6 +21,7 @@ AbstractTrees = "0.3, 0.4" CodecZlib = "0.7" EnumX = "1" FlameGraphs = "0.2, 1" +Graphviz_jll = "2.50.0" OrderedCollections = "1.1" ProgressMeter = "1.7" ProtoBuf = "1" diff --git a/README.md b/README.md index bb36f77..efe2caf 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,6 @@ PProf.Allocs.pprof() 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 070cf05..bdb6903 100644 --- a/src/PProf.jl +++ b/src/PProf.jl @@ -7,6 +7,7 @@ using ProtoBuf using OrderedCollections using CodecZlib import pprof_jll +import Graphviz_jll using Profile: clear @@ -378,7 +379,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