NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1171 most downloaded on PyPI
Call stack profiler for Python. Shows you why your code is slow!
Last release 2 months ago
29 Jul 2026
Ships fairly regularly
a new release about every 3 months
Some releases are documented
notes for 13 of 51 stable releases
1 version withdrawn
withdrawn after publishing
12 years old
56 releases · first in 2014
Replaced the deprecated vendored appdirs implementation with simpler internal platform-specific user-data-directory handling ( #451 ).
PYINSTRUMENT_SHOW_CALLBACK is respected when PYINSTRUMENT_PROFILE_DIR is configured, allowing profiles to be selectively written to disk (#452).%%pyinstrument magic so console-specific render options, including time=percent_of_total, flat, short_mode, color, and Unicode settings, are correctly applied to text output (#446).One column per quarter.
Adds the ability to customize description using CLI option --target-description
--target-description (#408)Fix some memory leaks in the low-level C extension
Precision of printed durations now adapts to the interval of the profile. This allows you to see more detail when the interval, and hides unnecessary
Nothing published for this version
Fix a bug that caused jupyter notebooks to continue to run after a profiled cell was interrupted with Ctrl-C
Adds a Django option to customise the filename of saved profile runs
Loads of improvements to the HTML renderer!
Loads of improvements to the HTML renderer!
Timeline mode - see and zoom into an interactive linear timeline!
HTML mode now has interactive options, rather than needing to set the upfront.
Streamlined the design of the HTML page header.
HTML Call stack view supports arrow key navigation.
The way ‘library’ code is detected has been changed. Previously, if the string ‘/lib/’ occurred in the file path, that was considered library code (and collapsed by default). Now, pyinstrument captures the paths of the Python install and any active virtualenv/conda env at profile time. Files that are stored there are considered library. That should give fewer false positives.
Calls to profiler.start() can now pass a target_description parameter, which is displayed in the profile readout.
Check my blog post for more info on the new features.
Fix a bug introduced in 4.7.0 which would cause the profiler to crash when profiling code with unusual locals, notably some pytest extensions
glom on Python 3.12 or later, which mutate the locals() dict. (#336)UnicodeDecodeError on some platforms (#330)Fix a bug that caused the HTML output to fail to render in some browser contexts
Nothing published for this version
Nothing published for this version
Nothing published for this version
Adds a feature -c, which allows profiling code directly from the command line, like python -c.
-c, which allows profiling code directly from the command line, like python -c. (#271)Profiler.write_html, for writing HTML output to a file directly. (#266)Fix a problem in the packaging process that prevented upload to PyPI
Fix a bug that caused [X frames hidden] in the output when frames were deleted due to __tracebackhide__
[X frames hidden] in the output when frames were deleted due to __tracebackhide__ (#255)None in the console output (#254)Adds a flat mode to the console renderer, which can be enabled by passing -p flat on the command line. This mode shows the heaviest frame as measured
-p flat on the command line. This mode shows the heaviest frame as measured by self-time, which can be useful in some codebases. (#240)pstats files. This is the file format used by cprofile in the stdlib. It's less detailed than pyinstrument profiles, but it's compatible with more tools. (#236)--show-all option - pyinstrument will no longer remove Python-internal frames when this option is supplied. (#239)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →