← Browse all tools

Go Back
Report Abuse

py-spy

Sampling profiler for Python programs

Tool overview

py-spy is a sampling profiler for Python programs. It shows where a program spends its time without restarting it or modifying its code, by attaching to a running process or launching a new one.

It can record flame graphs, display a live top-like view of the busiest functions, or dump the current call stack of every thread, which helps with hung programs. Because it is written in Rust and runs outside the profiled process, its overhead is very low and it can be used on production code.

py-spy runs on Linux, macOS, Windows and FreeBSD and supports CPython 2.3–2.7 and 3.3 onwards. It is installed with pip and is free and open source under the MIT licence.

Screenshots & video

Py spy
Py spy
Py spy
Py spy

Community reviews

Login to Write Your Review

There are no reviews yet.

Source & attribution

Original contributor
Jean-Baptiste CROUIGNEAU
External references
https://github.com/benfred/py-spy