Tool to visualize profiling data -- a UI for gprof2dot
Project description
Profinspect
A local web app for visualizing profiling data. Wraps gprof2dot and Graphviz dot with an interactive browser UI featuring pan/zoom, configurable thresholds, and format selection.
Requirements
- Python 3.12+
- Graphviz (
dotcommand must be available) - gprof2dot (defaults to running via
uvx gprof2dot)
Installation
Install from PyPI:
pip install profinspect
Or with uv:
uv pip install profinspect
Usage
profinspect [file] [--port PORT] [--no-browser]
Run with no arguments to open the UI with an empty file input:
profinspect
Pass a profile file to open the UI and immediately render the graph:
profinspect output.pstats
profinspect --port 8080 callgrind.out
The --no-browser flag starts the server without opening a browser window.
You can also run as a module:
python -m profinspect output.pstats
Supported Profile Formats
All formats supported by gprof2dot: prof, pstats, callgrind, perf, collapse, axe, dtrace, hprof, json, sleepy, sysprof, xperf
The format is auto-detected from the file extension when possible (e.g. .pstats, .prof, callgrind.out.*), otherwise, you can override the format manually in the dropdown.
These correspond to the formats supported by gprof2dot. Common examples:
| Profiler | Format | Example |
|---|---|---|
| Python cProfile / profile | pstats |
python -m cProfile -o out.pstats script.py |
| Linux perf | perf |
perf record -g -- ./app && perf script |
| Valgrind callgrind | callgrind |
valgrind --tool=callgrind ./app |
| gprof | prof |
gprof ./app gmon.out |
| FlameGraph / py-spy | collapse |
py-spy record -f raw -o out.collapse |
UI Overview
The main view has a collapsible sidebar with options and a pannable/zoomable display area for the SVG graph view.
The graph view updates automatically as you change parameters. You can disable
this if you prefer to control the updates with the "Generate" button (or use
shortcut Ctrl+Enter).
Sidebar options:
- File picker (browse button) with auto-detected format
- Format dropdown with auto-detect or manual override
- Node and edge threshold sliders (prune low-impact nodes/edges)
- Filters for functions called from/to
- Colormap selection (color, bw, gray, pink, print)
- Advanced: max depth, color skew, path filter, strip C++ names, wrap labels, color by self time, show samples
Zoom controls: buttons for zoom in/out, 1:1 reset, and fit-to-view. Mouse wheel zooms at cursor. Click-drag to pan. Ctrl+Enter triggers generation.
Text selection: click-drag on text within graph nodes to select and copy function names. Panning is disabled over text elements to allow selection.
Settings
Accessible from the Settings tab in the UI. Persisted to ~/.config/profinspect/settings.json.
Configurable values:
- command to run gprof2dot (default:
gprof2dot, you can useuvx gprof2dot) - command to run Graphviz dot (default:
dot) - Default values for all generation options (thresholds, colormap, etc.)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file profinspect-0.1.1.tar.gz.
File metadata
- Download URL: profinspect-0.1.1.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15e2cabd040ed2fc56dec473e4ad5f1420d29414b36bb085e1581a6353b1e4d7
|
|
| MD5 |
0a78d0bfddfaf1b85a4f40cb68e58c81
|
|
| BLAKE2b-256 |
07975b5bec37bf8fb8d860a7737bc8209799b90b0b5b6c184542b83e87cab356
|
Provenance
The following attestation bundles were made for profinspect-0.1.1.tar.gz:
Publisher:
publish.yml on eliasdorneles/profinspect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
profinspect-0.1.1.tar.gz -
Subject digest:
15e2cabd040ed2fc56dec473e4ad5f1420d29414b36bb085e1581a6353b1e4d7 - Sigstore transparency entry: 868186004
- Sigstore integration time:
-
Permalink:
eliasdorneles/profinspect@e38c53831b5cbe327d52e043869f8f85e0ce104e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/eliasdorneles
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e38c53831b5cbe327d52e043869f8f85e0ce104e -
Trigger Event:
release
-
Statement type:
File details
Details for the file profinspect-0.1.1-py3-none-any.whl.
File metadata
- Download URL: profinspect-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8861f4248375ce22796ea7457de9e29f45428a5fe578cbb7d010e85bd85300b
|
|
| MD5 |
e8bf79bdaeb9b50b1684ca5fbdcdefc4
|
|
| BLAKE2b-256 |
d1d06cdb11a245f078bd17fabd5deb159e4069115d3ee99e21750d7e792c605b
|
Provenance
The following attestation bundles were made for profinspect-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on eliasdorneles/profinspect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
profinspect-0.1.1-py3-none-any.whl -
Subject digest:
d8861f4248375ce22796ea7457de9e29f45428a5fe578cbb7d010e85bd85300b - Sigstore transparency entry: 868186008
- Sigstore integration time:
-
Permalink:
eliasdorneles/profinspect@e38c53831b5cbe327d52e043869f8f85e0ce104e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/eliasdorneles
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e38c53831b5cbe327d52e043869f8f85e0ce104e -
Trigger Event:
release
-
Statement type: