Skip to content

nazarhktwitch/runmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

runmap

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

Getting Started

pip install runmap
python -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

Features

  • 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: --depth and --min-ms trim noise from large trees.
  • Trace files: --out saves a .trace JSON file for later comparison.
  • Diff mode: runmap diff A.trace B.trace shows a delta table (faster/slower/new).
  • Sampling mode: --sample uses signal-based 100 Hz sampling instead of sys.settrace (Unix only).

Requirements

  • Python 3.10+
  • rich >= 13.0

License

MIT

About

Visualize Python function call trees with timing in the terminal

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages