Skip to main content

Which Python profiler fits your workload? Filter by focus, attach mode, and more; get a runnable command.

Project description

which-profiler

Which Python profiler fits your workload? Filter by focus, attach mode, and more; get a runnable command.

What it does

A filtered catalog: describe your workload (what you care about, attach vs launch, target Python) and which-profiler narrows the options and ranks the profilers by measured overhead. Each entry prints a copy-paste-runnable uv-based command & useful information.

Install

uvx which-profiler            # run without installing
uv tool install which-profiler

Only runtime dependency is typer. Runs on Python 3.10+.

Usage

which-profiler                          # interactive: one question, ranked catalog
which-profiler --nosy                   # interactive: also asks attach/python/native/view/rate
which-profiler --all                    # full landscape (incompatible tools tagged, not hidden)
which-profiler --focus time --python 3.15
which-profiler pytest                   # bare console-command target
which-profiler python -m my_module      # same, python-invocation form
which-profiler --focus memory -- script.py --arg   # script target after --
which-profiler --pid 12345              # attach-capable tools only
which-profiler --tool py-spy pytest     # exactly this tool (py-spy or py_spy both work)
which-profiler --focus time --view flamegraph --run pytest   # build + run top pick
which-profiler --focus time --json      # machine-readable, no prompts

The talk

Come see "uvx which-profiler: Which Profiler, When?" at EuroPython 2026:

EuroPython 2026, Kraków

📍 Room S2

📅 Wednesday, 15 July 2026

🕐 15:25

👉 https://ep2026.europython.eu/session/uvx-which-profiler-which-profiler-when/

Potential profilers to include in the future

Development

Setup via mise:

mise run install
mise run fix
mise run check
mise run test       # uv run pytest in dev venv (.venv, pinned to .python-version)
mise run test-all   # full matrix: root tests on 3.10-3.15 + examples tests on 3.14

test-all runs scripts/test-matrix.sh, which tests each supported Python in its own isolated venv under .venvs/py<version>/ (gitignored) so the shared dev .venv is never resynced to a different interpreter. It prints a python -> pass/fail/skip summary table at the end; 3.15 (still prerelease) degrades a dependency-install failure to a recorded skip instead of a hard failure.

Where the numbers come from

Overhead ranking is based on a benchmark from 2026-07-13: ThinkPad X1 Carbon Gen5, all samplers forced to 100 Hz for parity, median-of-7 repeats, over a tight numeric loop and a call-dense workload. The CLI (and --json) only show the coarse category (negligible/low/moderate/high); reproducible scripts and further measurements will come later.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

which_profiler-0.1.0.tar.gz (90.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

which_profiler-0.1.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file which_profiler-0.1.0.tar.gz.

File metadata

  • Download URL: which_profiler-0.1.0.tar.gz
  • Upload date:
  • Size: 90.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for which_profiler-0.1.0.tar.gz
Algorithm Hash digest
SHA256 504e3a9678ccca92bf1c9408ea4b016adccc4ffc34024da2c12479ab2cd2740e
MD5 050aed1815b5f92bc01a1ac3de70ca52
BLAKE2b-256 94f270cd07296bf126e81984c7f44b907a2f061dd23de8401bc9e96208fd0eda

See more details on using hashes here.

Provenance

The following attestation bundles were made for which_profiler-0.1.0.tar.gz:

Publisher: publish.yml on jstriebel/which-profiler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file which_profiler-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: which_profiler-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for which_profiler-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6db12da740e4f5cd45683edda22608062b7c9fdae1c78f03af15bbf8037df5af
MD5 c2cc192e430cfd795112b05023100826
BLAKE2b-256 929e80af5e8c430177f90a2feede96ab6f2d5e1ea8c4985374f13a0aea3bbcb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for which_profiler-0.1.0-py3-none-any.whl:

Publisher: publish.yml on jstriebel/which-profiler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page