ACENLY Bench
Track Python function performance across commits. Catch regressions before they ship.
ACENLY Bench · main@a3f9c1b2 · Python 3.12.3
Function Median P95 vs last commit
──────────────────────────────────────────────────────────────
deduplicate_users 1.24 ms 1.51 ms ▼ 38.1% faster
build_index 84.21 ms 97.13 ms ▲ 12.4% slower ⚠
filter_records 0.88 ms 0.92 ms ~ +0.2%
What it does
- Precise timing — runs each function in an isolated subprocess with warmup, batch timing, and outlier trimming
- Regression detection — compares against the last stored result and flags slowdowns
- Git hook integration — blocks pushes automatically when a regression exceeds your threshold
- History tracking — stores all runs in a local SQLite database so you can see trends over time
No external services. No accounts. Runs entirely on your machine.
Install
pip install pyyaml
Then copy bench.py and bench_db.py into your project root.
Quick start
# Benchmark a specific function right now
python3 bench.py myfile.py::my_function
# Show history for tracked functions
python3 bench.py --history
# High-precision mode (batch timing, 3s measurement window)
python3 bench.py --precise
Track functions automatically
Create acenly.yml in your project root (see acenly.example.yml):
benchmark:
track:
- file: mymodule/utils.py
function: process_batch
- file: mymodule/search.py
function: find_duplicates
regression_warn: 0.10 # warn if 10% slower
regression_block: 0.25 # block push if 25% slower
noise_floor: 0.05 # ignore changes smaller than 5%
trials: 5
warmup: 2
Then install the git hook:
python3 bench.py --install-hooks
From now on, every git push runs the benchmark automatically. If a function regresses past the block threshold, the push is stopped.
python3 bench.py --skip-hooks # bypass when needed
python3 bench.py --uninstall-hooks
Options
| Flag | Description |
|---|---|
file.py::func |
Benchmark a specific function |
--compare |
Show diff vs last stored result |
--history |
Print run history for tracked functions |
--precise |
High-precision mode: adaptive warmup, batch timing |
--repeat N |
Run N times, keep the best result |
--install-hooks |
Install git pre-push hook |
--uninstall-hooks |
Remove git pre-push hook |
--skip-hooks |
Run benchmark without enforcing regression block |
--hook-mode |
Used internally by the git hook |
How timing works
Each benchmark runs in a separate subprocess to avoid interference from the parent process. In normal mode, each function is called trials times with warmup discarded runs first. In --precise mode:
- Adaptive warmup — keeps running until timing variance drops below 3% (CPU caches settled)
- Batch calibration — finds a batch size so each measurement window takes ~50ms, then divides — this eliminates OS scheduler jitter from individual timings
- 3-second window — collects ~60 batch measurements, reports the minimum (least OS interference)
Results are stored in bench.db alongside your project.
License
MIT
Metadata
Release files for acenly-bench 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 | |
|---|---|---|---|---|
| acenly_bench-0.1.0.tar.gz | 11.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| acenly_bench-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.6 kB
Release files / acenly_bench-0.1.0.tar.gz
| Download URL | acenly_bench-0.1.0.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6fd297c794cd48e5a9459af7b844c8523551b1672559242cad84cf3d1aa4867
|
|
BLAKE2b-256 checksum How to use checksums |
6c860a53efb40d9840b3c0ebf3fb53c106deefb3a2953391c9669013a9f3ef57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / acenly_bench-0.1.0-py3-none-any.whl
| Download URL | acenly_bench-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1870ccb39cea543f7a192cdbe896ec2eaf47af7417f2a17dfb1aad6f75fda868
|
|
BLAKE2b-256 checksum How to use checksums |
ba392dae068bff9476d5e70f49aca68225ae9b5c1a2a5f4326744bc6527b6bd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for acenly-bench 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.