Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.44 KB

File metadata and controls

52 lines (40 loc) · 1.44 KB

yapflame

Simple yappi flamegraphs with support for multi-threading.

Installation

pip install yapflame
uv add yapflame
# and others...

Examples

from yapflame import profile

with profile() as p:
    do_work()

p.open() # browser
p.save("o.html") # file

enabled=False to noop:

with profile(enabled=DEBUG) as p:
    do_work()
if p:
    p.open()

or via cli:

yapflame script.py
yapflame script.py -o out.html
yapflame script.py --cpu