benfred/py-spy

Sampling profiler for Python programs

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 30 minutes ago
Added to GitGenius on September 3rd, 2026
Created on August 1st, 2018
Open Issues & Pull Requests: 239 (+0)
GitHub issues: Enabled
Number of forks: 542
Total Stargazers: 15,481 (+0)
Total Subscribers: 116 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 12.3 days
Mean response time: 79.8 days
90th percentile: 285.0 days
Tracked items: 79

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 95% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 2% of issues opened in the past year have been closed. Three people close 87% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 65
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 693 days
Stale 30+ days: 62
Stale 90+ days: 58

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (1)
  • enhancement (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

py-spy is a sampling profiler for Python programs written in Rust that visualizes where a Python program spends execution time without requiring code modification or program restart.

The tool solves the problem of understanding Python performance bottlenecks in running systems by sampling the call stack at intervals and analyzing where time is spent. Because it runs as a separate process written in Rust rather than instrumenting the target Python program, it achieves extremely low overhead and can safely profile production code. It works by attaching to a running Python process by its PID or by launching a new Python program and collecting stack samples, then generating visualizations of the profiling results.

Developers should choose this tool when they need to profile Python code in production environments or other scenarios where modifying code or restarting the program is impractical. It suits any project running CPython versions from 2.3 through 3.14 on Linux, macOS, Windows, or FreeBSD. The tool supports profiling native extensions written in C, C++, or Cython when compiled with symbols, which distinguishes it from pure-Python profilers. Installation is straightforward through multiple channels including PyPI wheels, Homebrew, package managers for various Linux distributions, and Cargo for Rust users.

The project maintains active build automation across multiple platforms and architectures. Development activity spans support for a wide range of Python versions and operating systems, indicating sustained maintenance across diverse environments. The tool includes multiple operational modes—recording profiles to files, displaying real-time statistics, and dumping stack information—suggesting ongoing refinement of its interface and capabilities.