3 ms·
https://github.com/brendangregg/FlameGraph https://github.com/brendangregg/FlameGraph You record performance data with `perf`, then use the scripts there to tu
by plorkyeran 1y ago
https://github.com/brendangregg/FlameGraph https://github.com/brendangregg/FlameGraph
You record performance data with `perf`, then use the scripts there to turn it into a SVG.
- immortaljoe 1y agoOP here. In this particular case, I used https://github.com/flamegraph-rs/flamegraph https://github.com/flamegraph-rs/flamegraph
- IshKebab 1y agoI strongly recommend not using this. Instead use pprof - it has a MUCH better interactive flamegraph, plus other nice performance visualisations (e.g. a call graph): https://github.com/google/pprof https://github.com/google/pprof go install github.com/google/pprof@latest pprof -http=: prof.out I normally collect the profiles with gperftools (https://github.com/gperftools/gperftools https://github.com/gperftools/gperftools) and then just LD_PRELOAD=/usr/lib/libtcmalloc_and_profiler.so CPUPROFILE=prof.out <your command> I've been meaning to try Samply though. Not sure if it works with pprof.