Visualize Python function call trees with timing in the terminal
Run any script through runmap and see a tree of every function call, how long each took, and where the hot spots are
pip install runmappython -m runmap script.py
python -m runmap script.py --min-ms 5 --depth 3
python -m runmap script.py --out run.trace
python -m runmap diff before.trace after.trace- Call tree view: shows the full function call hierarchy with per-node timing.
- Time bars: proportional block bars next to each node for quick visual scanning.
- Hot markers: flags functions whose self time exceeds 20% of total runtime.
- Depth and threshold filters:
--depthand--min-mstrim noise from large trees. - Trace files:
--outsaves a.traceJSON file for later comparison. - Diff mode:
runmap diff A.trace B.traceshows a delta table (faster/slower/new). - Sampling mode:
--sampleuses signal-based 100 Hz sampling instead ofsys.settrace(Unix only).
- Python 3.10+
- rich >= 13.0