Catalog PyPI
PACKAGE EXPLORERView in registry

acenly-bench

PyPI

Track Python function performance across commits. Catch regressions before they ship.

Versions collected1
Direct dependencies1From release 0.1.0
Last observed20 Oct, 18:09 UTC

README

Version 0.1.0 documentation

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

FlagDescription
file.py::funcBenchmark a specific function
--compareShow diff vs last stored result
--historyPrint run history for tracked functions
--preciseHigh-precision mode: adaptive warmup, batch timing
--repeat NRun N times, keep the best result
--install-hooksInstall git pre-push hook
--uninstall-hooksRemove git pre-push hook
--skip-hooksRun benchmark without enforcing regression block
--hook-modeUsed 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:

  1. Adaptive warmup — keeps running until timing variance drops below 3% (CPU caches settled)
  2. Batch calibration — finds a batch size so each measurement window takes ~50ms, then divides — this eliminates OS scheduler jitter from individual timings
  3. 3-second window — collects ~60 batch measurements, reports the minimum (least OS interference)

Results are stored in bench.db alongside your project.


License

MIT

Downloads & popularity

1downloads
1-day window · source-reported counts18 Oct 2026
1890
2026-07-21: 2 · observed 2026-10-20T19:11:01.6498676Z · period 2026-07-21–2026-07-212026-07-22: 2 · observed 2026-10-20T19:11:01.6498676Z · period 2026-07-22–2026-07-222026-07-23: 3 · observed 2026-10-20T19:11:01.6498676Z · period 2026-07-23–2026-07-232026-07-27: 2 · observed 2026-10-20T19:11:01.6498676Z · period 2026-07-27–2026-07-272026-08-01: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-02–2026-08-022026-08-03: 4 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-03–2026-08-032026-08-04: 4 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-04–2026-08-042026-08-07: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-07–2026-08-072026-08-09: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-09–2026-08-092026-08-13: 2 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-13–2026-08-132026-08-14: 4 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-14–2026-08-142026-08-17: 4 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-17–2026-08-172026-08-18: 18 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-18–2026-08-182026-08-20: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-20–2026-08-202026-08-23: 3 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-23–2026-08-232026-08-24: 8 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-24–2026-08-242026-08-28: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-28–2026-08-282026-08-31: 3 · observed 2026-10-20T19:11:01.6498676Z · period 2026-08-31–2026-08-312026-09-01: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-01–2026-09-012026-09-03: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-03–2026-09-032026-09-06: 2 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-06–2026-09-062026-09-07: 3 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-07–2026-09-072026-09-09: 2 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-09–2026-09-092026-09-10: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-10–2026-09-102026-09-12: 3 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-12–2026-09-122026-09-14: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-14–2026-09-142026-09-18: 2 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-18–2026-09-182026-09-26: 3 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-26–2026-09-262026-09-28: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-28–2026-09-282026-09-29: 2 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-29–2026-09-292026-09-30: 5 · observed 2026-10-20T19:11:01.6498676Z · period 2026-09-30–2026-09-302026-10-01: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-10-01–2026-10-012026-10-06: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-10-06–2026-10-062026-10-07: 4 · observed 2026-10-20T19:11:01.6498676Z · period 2026-10-07–2026-10-072026-10-08: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-10-08–2026-10-082026-10-09: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-10-09–2026-10-092026-10-13: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-10-13–2026-10-132026-10-15: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-10-15–2026-10-152026-10-17: 2 · observed 2026-10-20T19:11:01.6498676Z · period 2026-10-17–2026-10-172026-10-18: 1 · observed 2026-10-20T19:11:01.6498676Z · period 2026-10-18–2026-10-18
21 Jul18 Oct

pypistats · 41 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-18 – 2026-10-1812026-10-20T19:11:01.6498676Z
2026-10-17 – 2026-10-1722026-10-20T19:11:01.6498676Z
2026-10-15 – 2026-10-1512026-10-20T19:11:01.6498676Z
2026-10-13 – 2026-10-1312026-10-20T19:11:01.6498676Z
2026-10-09 – 2026-10-0912026-10-20T19:11:01.6498676Z
2026-10-08 – 2026-10-0812026-10-20T19:11:01.6498676Z
2026-10-07 – 2026-10-0742026-10-20T19:11:01.6498676Z
2026-10-06 – 2026-10-0612026-10-20T19:11:01.6498676Z
2026-10-01 – 2026-10-0112026-10-20T19:11:01.6498676Z
2026-09-30 – 2026-09-3052026-10-20T19:11:01.6498676Z
2026-09-29 – 2026-09-2922026-10-20T19:11:01.6498676Z
2026-09-28 – 2026-09-2812026-10-20T19:11:01.6498676Z
2026-09-26 – 2026-09-2632026-10-20T19:11:01.6498676Z
2026-09-18 – 2026-09-1822026-10-20T19:11:01.6498676Z
2026-09-14 – 2026-09-1412026-10-20T19:11:01.6498676Z
2026-09-12 – 2026-09-1232026-10-20T19:11:01.6498676Z
2026-09-10 – 2026-09-1012026-10-20T19:11:01.6498676Z
2026-09-09 – 2026-09-0922026-10-20T19:11:01.6498676Z
2026-09-07 – 2026-09-0732026-10-20T19:11:01.6498676Z
2026-09-06 – 2026-09-0622026-10-20T19:11:01.6498676Z
2026-09-03 – 2026-09-0312026-10-20T19:11:01.6498676Z
2026-09-01 – 2026-09-0112026-10-20T19:11:01.6498676Z
2026-08-31 – 2026-08-3132026-10-20T19:11:01.6498676Z
2026-08-28 – 2026-08-2812026-10-20T19:11:01.6498676Z
2026-08-24 – 2026-08-2482026-10-20T19:11:01.6498676Z
2026-08-23 – 2026-08-2332026-10-20T19:11:01.6498676Z
2026-08-20 – 2026-08-2012026-10-20T19:11:01.6498676Z
2026-08-18 – 2026-08-18182026-10-20T19:11:01.6498676Z
2026-08-17 – 2026-08-1742026-10-20T19:11:01.6498676Z
2026-08-14 – 2026-08-1442026-10-20T19:11:01.6498676Z
2026-08-13 – 2026-08-1322026-10-20T19:11:01.6498676Z
2026-08-09 – 2026-08-0912026-10-20T19:11:01.6498676Z
2026-08-07 – 2026-08-0712026-10-20T19:11:01.6498676Z
2026-08-04 – 2026-08-0442026-10-20T19:11:01.6498676Z
2026-08-03 – 2026-08-0342026-10-20T19:11:01.6498676Z
2026-08-02 – 2026-08-0212026-10-20T19:11:01.6498676Z
2026-08-01 – 2026-08-0112026-10-20T19:11:01.6498676Z
2026-07-27 – 2026-07-2722026-10-20T19:11:01.6498676Z
2026-07-23 – 2026-07-2332026-10-20T19:11:01.6498676Z
2026-07-22 – 2026-07-2222026-10-20T19:11:01.6498676Z
2026-07-21 – 2026-07-2122026-10-20T19:11:01.6498676Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.030 Jun 20261

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
yannweiler/acenly_bench

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:09 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:20cfd83413fa9a054aa83f143aba1514a2d89e51e55077f1159ea131c330a69d