Sampling Profiler
A performance analysis technique that samples a program's call stack at fixed time intervals to estimate the proportion of time spent in each function. It has low overhead and requires no modification of the profiled program, making it suitable for long-running service programs.
Timeline (last 90 days)
Sampling profilers do not modify the profiled program at all; instead, they interrupt the interpreter at fixed time intervals in the background to capture call stack snapshots, at the cost of being unable to give exact call counts, and short-lived functions may be missed.
Python 3.15 introduces a sampling-based profiler that captures call stack snapshots at a fixed frequency, has little impact on program performance, and is suitable for analyzing long-running services.
Python 3.15's sampling profiler supports a mode that attaches to an already running process, which requires the target process's PID as an entry parameter.
All Facts (3)
Sampling profilers do not modify the profiled program at all; instead, they interrupt the interpreter at fixed time intervals in the background to capture call stack snapshots, at the cost of being unable to give exact call counts, and short-lived functions may be missed.
50%UnverifiedPython 3.15 introduces a sampling-based profiler that captures call stack snapshots at a fixed frequency, has little impact on program performance, and is suitable for analyzing long-running services.
50%UnverifiedPython 3.15's sampling profiler supports a mode that attaches to an already running process, which requires the target process's PID as an entry parameter.
50%