profiling-explorer
Table-based exploration tool for Python profiling data (pstats files).
Read more in the introductory blog post.
Get better at command line Git with my book Boost Your Git DX.
Requirements
Python 3.11 to 3.15 supported.
Installation
Install with pip:
python -m pip install profiling-explorer
Usage
profiling-explorer reads pstats files as generated by Python’s profilers: profiling.tracing (called cProfile on Python < 3.15) and profiling.sampling (new in Python 3.15). To use it, first generate a profile file, for example by running your program under cProfile:
$ python -m cProfile -o example.pstats example.py
(Also runnable as python -m profiling.tracing instead on Python 3.15+.)
Then run profiling-explorer with the generated file:
$ profiling-explorer example.pstats
The report will open in your web browser, and you can explore the profile data with the interactive interface. Features:
Click the calls, internal ms, cumulative ms, or ms/call column headers to sort by that column. ms/call is the cumulative time divided by the number of calls, useful for finding functions that are slow each time they run, rather than those called many times.
Use the search box to filter by filename or function name. Separate multiple search terms by spaces to match records that contain all terms.
Press a keyboard shortcut to focus the search box: /, Control+K, or Command+K. Select some text first, like a filename, to pre-fill the search box with that text.
Hover by a filename + line number pair to reveal the copy button, which copies the location to your clipboard for faster opening.
Click a filename + line number pair to open that file at that line in your editor. See Opening files in your editor below.
Click the callers or callees links on the right of a row to see the callers or callees of that function. The ← back link returns to the main table with your previous search and sort order.
Opening files in your editor
When you click a filename, profiling-explorer runs your editor to open the file at that line, using launch-editor-py. It picks the editor from one of these options, in this order:
The LAUNCH_EDITOR environment variable, for override.s
A supported editor that’s currently running, such as VS Code, Sublime Text, or Zed.
The VISUAL environment variable.
The EDITOR environment variable.
Terminal editors like Vim open in the terminal running profiling-explorer.
Full help
usage: profiling-explorer [-h] [--port PORT] [--dev] FILE
positional arguments:
FILE The pstats data file to explore.
options:
-h, --help show this help message and exit
--port PORT Port for the local web server (default: 8099).
--dev Run in development mode (enables server reload and debug mode).
Metadata
Release files for profiling-explorer 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| profiling_explorer-1.3.1.tar.gz | 15.9 kB | With provenance | Details for profiling_explorer-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| profiling_explorer-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for profiling_explorer-1.3.1-py3-none-any.whl |
Total release size: 36.0 kB
Release files / profiling_explorer-1.3.1.tar.gz
| Download URL | profiling_explorer-1.3.1.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c5eae4cc6636ba982bb905b902c880bcc6d2f7a8a2362bafcc9028ff71decfa
|
|
BLAKE2b-256 checksum How to use checksums |
ec8cdc4241c9d184087f7cb66bf10b3096ce98deb1664a6bf7bbfcb51668bddb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logRelease files / profiling_explorer-1.3.1-py3-none-any.whl
| Download URL | profiling_explorer-1.3.1-py3-none-any.whl |
|---|---|
| Size | 20.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8bd031012d02f686709d829e5ba8354f30a2022166f2b4e872c867b9a2e495b
|
|
BLAKE2b-256 checksum How to use checksums |
6ca5e4b172f4f06fbe16d83cc4b11a6bad90b5fac52f463d662afe22c5e2f595
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for profiling-explorer 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for profiling_explorer-1.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.