Repository navigation
feat(bench): add pytest-benchmark suite with make bench target - #15
Merged
Merged
Conversation
5 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements I2 — performance benchmarks: a
benchmarks/directory (excluded from the regular test run viatestpaths) covering alignment, end-to-endcompare, loop detection (incl. pathological single-tool repeat), recovery metrics, OpenInference parsing at 1000 spans, and report serialization. Run via newmake bench(pytest-benchmark, autosaved locally,.benchmarks/gitignored).Why
Roadmap WS-I2 and the evidence-based replacement for the descoped A6: measure where the engine actually strains instead of speculatively building streaming ingestion.
How
benchmarks/conftest.py(deterministic; no coupling to test fixtures).make lint/formatextended to coverbenchmarks/; dev dependency added:pytest-benchmark>=4.0.Baseline numbers (M2, py3.14) — the headline finding: LCS alignment dominates everything: 100 steps ≈ 16ms → 500 ≈ 390ms → 1000 ≈ 1.6s (quadratic-ish growth), while loop detection (~3ms @1k), metrics (<1ms), and adapter parsing (~17ms @1k spans) are noise by comparison. This hard-confirms the A6 descope rationale and gives us the regression baseline for future aligner work.
Testing
make bench: 13 benchmarks pass, results autosavedChecklist
make lintpassesuv run python -m pytestis green (300 passed)CHANGELOG.mdentry added under[Unreleased]