scope-profiler
Profile Python code regions—and optionally C, Fortran, MPI, NVTX, and LIKWID—with one consistent API and HDF5 output format.
pip install scope-profiler
Quick start
from scope_profiler import ProfileManager
with ProfileManager.session():
@ProfileManager.profile("main")
def main():
with ProfileManager.profile_region("work"):
sum(range(100)) # replace with the code you want to measure
main()
# writes profiling_data.h5 and prints a summary
You can also profile a script without changing its source:
scope-profiler run my_script.py
scope-profiler inspect profiling_data.h5
scope-profiler plot default profiling_data.h5 -o figures
scope-profiler report profiling_data.h5 -o report.html
Example output
The plotting tools include duration summaries and timelines for finding expensive regions:
The overhead benchmark measures the cost of each instrumentation mode:
python examples/benchmark_overhead.py
Documentation
- Installation
- Quick start
- Python API and post-processing
- CLI reference
- Configuration and profiling regions
- MPI, C, and Fortran
- LIKWID, line profiling, and MCP
- Tutorial notebooks
- Examples
Development
pip install -e '.[dev]'
pytest
See AGENTS.md for the measured benchmark workflow used when optimizing this project.
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 scope_profiler-0.3.6.tar.gz.
File metadata
- Download URL: scope_profiler-0.3.6.tar.gz
- Upload date:
- Size: 296.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8abc4dda2e5e11d9b2e2b1562ca00e7d930eb30c7777707a4b124e7ed057fa6
|
|
| MD5 |
f7ad4832a31192a38f7dc901d2ac3ce6
|
|
| BLAKE2b-256 |
1f4b90223d8f4fca709f42a619bd19e0a20531e3eedba91a8fea4f76db176aad
|
Provenance
The following attestation bundles were made for scope_profiler-0.3.6.tar.gz:
Publisher:
publish.yml on max-models/scope-profiler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scope_profiler-0.3.6.tar.gz -
Subject digest:
f8abc4dda2e5e11d9b2e2b1562ca00e7d930eb30c7777707a4b124e7ed057fa6 - Sigstore transparency entry: 2655112987
- Sigstore integration time:
-
Permalink:
max-models/scope-profiler@953e17725889525c9998484b0ba485ff5ada1a48 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/max-models
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@953e17725889525c9998484b0ba485ff5ada1a48 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scope_profiler-0.3.6-py3-none-any.whl.
File metadata
- Download URL: scope_profiler-0.3.6-py3-none-any.whl
- Upload date:
- Size: 337.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0287f1aa158938bc57b5aaea32af209b94e11f4f35a1ee1ad4e23211dcb770d2
|
|
| MD5 |
b63d82c4ba2054339472b57d4d8649f1
|
|
| BLAKE2b-256 |
5b6fff6176d0d1cb0a1c0d62ef3aef7481f52682853d1fc09bb0aa9a55db8392
|
Provenance
The following attestation bundles were made for scope_profiler-0.3.6-py3-none-any.whl:
Publisher:
publish.yml on max-models/scope-profiler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scope_profiler-0.3.6-py3-none-any.whl -
Subject digest:
0287f1aa158938bc57b5aaea32af209b94e11f4f35a1ee1ad4e23211dcb770d2 - Sigstore transparency entry: 2655112998
- Sigstore integration time:
-
Permalink:
max-models/scope-profiler@953e17725889525c9998484b0ba485ff5ada1a48 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/max-models
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@953e17725889525c9998484b0ba485ff5ada1a48 -
Trigger Event:
push
-
Statement type: