⚡ Performax
A lightweight profiling framework for JAX that makes it easy to measure execution time of your functions.
✨ Features
- 🎯 Simple decorator API - Just add
@trackto functions you want to profile - 🚀 Minimal overhead - Uses JAX's built-in Perfetto tracing
- 📊 Detailed statistics - Get total time, call counts, and averages
- 📁 Multiple output formats - Pretty tables, dictionaries, pandas DataFrames, and more
- 🎨 Flexible loggers - Rich tables, JSON, CSV, Markdown, and plain text output
- 🔒 Thread-safe - Prevents concurrent profiling conflicts
📦 Installation
pip install performax
Or install from source:
git clone https://github.com/noahfarr/performax.git
cd performax
pip install -e .
🚀 Quick Start
import jax.numpy as jnp
from performax import track, profile
@track
def matmul(a, b):
return jnp.dot(a, b)
@track(name="forward")
def forward(x, weights):
for w in weights:
x = matmul(x, w)
return x
def main():
x = jnp.ones((1000, 512))
weights = [jnp.ones((512, 512)) for _ in range(5)]
return forward(x, weights)
result, stats = profile(main)
print(stats)
Output:
Function | Total (ms) | Calls | Avg (ms)
-----------------------------------------
forward | 125.432 | 1 | 125.432
matmul | 98.765 | 5 | 19.753
📋 Requirements
- Python >= 3.12
- JAX >= 0.4.0
- rich (optional, for
RichLogger) - pandas (optional, for
to_dataframe())
🛠️ Development
pip install -e ".[development]"
pytest
pytest --cov=performax
pytest -m "not slow"
📄 License
MIT
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for performax 0.1.0
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 |
|---|---|---|---|---|
| performax-0.1.0.tar.gz | 11.8 kB | Without provenance | Details for performax-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| performax-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for performax-0.1.0-py3-none-any.whl |
Total release size: 18.6 kB
Release files / performax-0.1.0.tar.gz
| Download URL | performax-0.1.0.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
247f664ff2ca8635c705cfeaffb8c2ff5e49d4bdbebcc05047a2e416f894395a
|
|
BLAKE2b-256 checksum How to use checksums |
25951f057dd350d3b3ea55ddcc14278a110f6a0c922b7e484fcd2fc70191220e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / performax-0.1.0-py3-none-any.whl
| Download URL | performax-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5efd30a18afff4a63ba9060d652f2be6d56870a7f7257c146f629c45533a86b1
|
|
BLAKE2b-256 checksum How to use checksums |
99067ff8d3b0359dc8e0781a1dca8d7db63f85397735b86b4e1a21753650dfe9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for performax 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.