Skip to content

test: mark the IBAN long-run timing test as a benchmark - #81

Merged
stefanoferi merged 1 commit into
mainfrom
test/timing-benchmarks
Oct 6, 2026
Merged

stefanoferi merged 1 commit into
mainfrom
test/timing-benchmarks

Conversation

@stefanoferi

Copy link
Copy Markdown
Member

The 50 ms budget of tests/test_iban_it.py::test_matching_time_on_long_runs on 64k characters failed on the macOS runner of the v0.13.1 admina-core release (51.6 ms for the redactor on the "IT60 " run); the publish job ran after a rerun. The test now carries the benchmark marker, as the timing tests of tests/test_firewall_pattern_timing.py do since 0.13.0.

The other tests with a time limit were measured and stay in CI: the pattern-pack and probe tests assert that a quadratic pattern goes over the budget, the linear probe takes about 0.6 ms against 50 ms, the Presidio test has a 5 s limit and the prescanned-tag test takes 2 to 77 ms against 0.5 s.

Tests only; no release needed.

test_matching_time_on_long_runs checks a 50 ms budget for the IBAN matcher
and the regex PII redactor on 64k characters. On the macOS runner of the
v0.13.1 admina-core release it measured 51.6 ms for the redactor on the
"IT60 " run, and the publish job was skipped until the job was rerun. The
test carries the benchmark marker, so CI (-m "not benchmark") leaves it
out; the other tests of the file still run.

The other tests with a time limit stay in CI: the pattern-pack and probe
tests assert that a quadratic pattern goes over the budget, the linear
probe measures about 0.6 ms against 50 ms, the Presidio test has a 5 s
limit and the prescanned-tag test measures 2 to 77 ms against 0.5 s.
@stefanoferi
stefanoferi merged commit 1ece080 into main Oct 6, 2026
20 checks passed
@stefanoferi stefanoferi mentioned this pull request Oct 6, 2026
@stefanoferi
stefanoferi deleted the test/timing-benchmarks branch October 8, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant