{"repo":"benfred/py-spy","free":true,"listed":false,"github":"https://github.com/benfred/py-spy","clone":"git clone https://github.com/benfred/py-spy.git","description":"Sampling profiler for Python programs","language":"Rust","stars":15438,"topics":["profiler","python","performance-analysis","profiling"],"license":"MIT","category":"dev-tools","readme_excerpt":"py-spy: Sampling profiler for Python programs ===== py-spy is a sampling profiler for Python programs. It lets you visualize what your Python program is spending time on without restarting the program or modifying the code in any way. py-spy is extremely low overhead: it is written in Rust for speed and doesn't run in the same process as the profiled Python program. This means py-spy is safe to use against production Python code. py-spy works on Linux, OSX, Windows and FreeBSD, and supports profiling all recent versions of the CPython interpreter (versions 2.3-2.7 and 3.3-3.14). Installation Prebuilt binary wheels can be installed from PyPI with: You can also download prebuilt binaries from the GitHub Releases Page. If you're a Rust user, py-spy can also be installed with: . Note this builds py-spy from source and requires libunwind on Linux and Window, e.g., apt install libunwind-dev . On macOS, py-spy is in Homebrew and can be installed with . On Arch Linux, py-spy is in AUR and can be installed with . On Alpine Linux, py-spy is in testing repository and can be installed with . Usage py-spy works from the command line and takes either the PID of the program you want to sample from or the command line of the python program you want to run. py-spy has three subcommands , and : record py-spy supports recording profiles to a file using the command. For example, you can generate a flame graph of your python process by going: Which will generate an interactive SVG file looking li","default_branch":null,"files":null,"tree":[],"storefront":"/r/benfred","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/benfred/py-spy/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}