Command-line tool
py-spy
brew/py-spy
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Sampling profiler for Python programs
At a glance
- Type
- Command-line tool
- Install on
- macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
macOS
brew install py-spy
Linux
brew install py-spy
Show a live view of the functions that take the most execution time of a running process
py-spy top -p process_id
Start a program and show a live view of the functions that take the most execution time
py-spy top -- python path/to/file.py
Produce an SVG flame graph of the function call execution time
py-spy record -o path/to/profile.svg -p process_id
Related command-line tools
- rbspy
Sampling profiler for Ruby - async-profiler
Sampling CPU & HEAP profiler for Java using AsyncGetCallTrace + perf_events - btdu
Sampling disk usage profiler for btrfs - snakeviz
Web-based viewer for Python profiler output - samply
CLI sampling profiler - memray
Memory profiler for Python applications - kcov
Code coverage tester for compiled programs, Python, and shell scripts - librtlsdr
Use Realtek DVB-T dongles as a cheap SDR
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents