py-spy Python Profiler
github.com
12
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
py-spy is an open source sampling profiler for Python programs that lets developers visualize what their Python code is spending time on without restarting or modifying the application. Written in Rust for maximum performance, the profiler operates as a separate process that attaches to running Python programs, making it suitable for profiling production applications with near-zero overhead. Key features include generating flame graphs and speedscope visualizations for intuitive performance analysis, recording profiles over time to create interactive timeline views, and providing real-time top-like displays of active function calls. The profiler supports all major Python implementations including CPython 2.7 through 3.13 and PyPy, and works on Linux, macOS, and Windows with both x86 and ARM architectures. Because py-spy is implemented in Rust and runs as a separate process, it can profile applications without injecting any code into the target process, avoiding the GIL contention and performance overhead common with in-process profilers. This makes it particularly valuable for diagnosing performance bottlenecks in long-running services, web applications, data processing pipelines, and machine learning workloads where traditional profiling approaches are impractical. With over 10,000 stars on GitHub, py-spy has become a go-to tool for Python performance engineering and optimization, trusted by engineering teams at major technology companies for production profiling.
Statistics
12
Views
0
Clicks
0
Like
0
Dislike