Skip to main content

profiling-explorer

https://img.shields.io/github/actions/workflow/status/adamchainz/profiling-explorer/main.yml.svg?branch=main&style=for-the-badge https://img.shields.io/badge/Coverage-70%25-success?style=for-the-badge https://img.shields.io/pypi/v/profiling-explorer.svg?style=for-the-badge https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge pre-commit

Table-based exploration tool for Python profiling data (pstats files).

profiling-explorer screenshot

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

  1. 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:

  1. The LAUNCH_EDITOR environment variable, for override.s

  2. A supported editor that’s currently running, such as VS Code, Sublime Text, or Zed.

  3. The VISUAL environment variable.

  4. 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)

Source distribution for profiling-explorer 1.3.1
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)

Table of built distributions (wheels) for profiling-explorer 1.3.1
File Interpreter ABI Platform Actions
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 log

Release 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 log

Security 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.

Select from 2 files

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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page