feat(benchmark): add database query benchmark infrastructure#226
Draft
feat(benchmark): add database query benchmark infrastructure#226
Conversation
Add pytest-benchmark based benchmarking for v_ahb_diff query performance: - benchmarks/test_diff_query.py: 4 benchmark tests - 3x FV2410 -> FV2504 with pruefis 55109, 13002, 25001 - 1x FV2510 -> FV2604 with pruefi 13009 - scripts/compare_benchmarks.py: CI comparison script - Compares against baseline, reports regressions (>20% slower) - Outputs markdown table with timing changes - .github/workflows/benchmark.yml: CI workflow - Saves baseline on main branch pushes - Compares PRs against baseline (graceful if missing) - pyproject.toml: add [benchmark] optional dependency Only SELECT query time is measured - database creation happens in module-scoped fixtures and is excluded from timing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
hf-kklein
commented
Dec 16, 2025
.github/workflows/benchmark.yml
Outdated
| token: ${{ github.actor == 'dependabot[bot]' && secrets.REPO_AND_READ_PACKAGES_PAT || secrets.XML_SUBMODULE_PAT }} | ||
| submodules: "recursive" | ||
|
|
||
| - name: Set up Python 3.12 |
hf-kklein
commented
Dec 16, 2025
scripts/compare_benchmarks.py
Outdated
|
|
||
|
|
||
| def main() -> int: | ||
| if len(sys.argv) != 3: |
Contributor
Author
There was a problem hiding this comment.
can you use proper argparse
- Use Python 3.14 in benchmark workflow - Use argparse instead of manual sys.argv handling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Add pytest-benchmark based benchmarking for v_ahb_diff query performance:
Only SELECT query time is measured - database creation happens in module-scoped fixtures and is excluded from timing.
🤖 Generated with Claude Code