kimikage / ProfileSVG.jl

Write flame graphs to SVG format and explore them interactively in Jupyter, Pluto, etc.
MIT License
53 stars 7 forks source link
flame-graphs profiling

ProfileSVG

Docs Stable Docs Dev CI PkgEval Codecov

Purpose

ProfileSVG allows you to export profiling data as an SVG file. It can be used to display profiling results in Jupyter/IJulia notebooks, Pluto or any other SVG viewer.

An alternative visualization package is the GTK-based ProfileView. That package offers more interactive features. See the documentation for other visualization tools.

ProfileSVG is a package built on top of FlameGraphs. Among the Julia packages, ProfileView currently has the most comprehensive tutorial on how to interpret a flame graph.

Basic Usage in Jupyter

using ProfileSVG
@profview f(args...)

where f(args...) is the operation you want to profile.

The following screenshot illustrates Jupyter usage on a demonstration function profile_test:

Jupyter Notebook

You can hover over individual blocks in the flame graph to get more detailed information.

Third Party License Notes

The SVG data generated by ProfileSVG uses Snap.svg v0.3.0. Snap.svg is licensed under the Apache license version 2.0. See deps/LICENSE and deps/NOTICE for details.