Repository navigation
Add deterministic parser performance benchmarks and CI reporting - #37
jkowalleck with Copilot wants to merge 11 commits into
Conversation
…-15 per rule - Create .github/workflows/python-perf.yml with perf-smoke (PRs) and perf-full (push to main/next, schedule, manual) jobs - Remove perf-smoke and perf-full jobs from python-tests.yml - Add -m "not perf" to python-publish.yml quick-test step - Expand RULE_SAMPLES in tests/test_perf.py from 2 to 10-15 valid samples per rule (406 total, all validated)
| jobs: | ||
| perf-smoke: | ||
| name: Performance Smoke (py${{ env.PYTHON_VERSION_DEFAULT }}) | ||
| name: Performance Smoke (py3.14) |
There was a problem hiding this comment.
Updated in commit 2e1d1c7: the job name no longer prints the Python version.
| path: perf-results/ | ||
| perf-full: | ||
| name: Performance Full (py${{ env.PYTHON_VERSION_DEFAULT }}) | ||
| name: Performance Full (py3.14) |
There was a problem hiding this comment.
Updated in commit 2e1d1c7: the job name no longer prints the Python version.
| pull_request: | ||
| push: | ||
| branches: [ 'main', 'next' ] | ||
| schedule: |
There was a problem hiding this comment.
Updated in commit 2e1d1c7: removed the schedule trigger from this workflow.
| python -m pytest -m perf tests/test_perf.py -s | ||
| - name: Upload perf smoke results | ||
| if: always() | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 |
There was a problem hiding this comment.
@copilot have the version vomment the full version matching the git node id
There was a problem hiding this comment.
Updated in commit 2e1d1c7: changed the pinned action version comment to the full matching tag v4.6.2 for this hash.
| mkdir -p perf-results | ||
| python -m pytest -m perf tests/test_perf.py -s | ||
| - name: Upload perf smoke results | ||
| if: always() |
There was a problem hiding this comment.
@copilot add a comemnt linking to the sction
ala # see https://github.com/actions/setup-python
There was a problem hiding this comment.
Updated in commit 2e1d1c7: added a see comment linking to the actions/upload-artifact action.
| python -m pytest -m perf tests/test_perf.py -s | ||
| - name: Upload full perf results | ||
| if: always() | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 |
There was a problem hiding this comment.
@copilot add a comemnt linking to the sction
ala # see https://github.com/actions/setup-python
There was a problem hiding this comment.
Updated in commit 2e1d1c7: added a see comment linking to the actions/upload-artifact action.
| python -m pytest -m perf tests/test_perf.py -s | ||
| - name: Upload full perf results | ||
| if: always() | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 |
There was a problem hiding this comment.
@copilot have the version vomment the full version matching the git node id
There was a problem hiding this comment.
Updated in commit 2e1d1c7: changed the pinned action version comment to the full matching tag v4.6.2 for this hash.
| path: perf-results/ | ||
| perf-full: | ||
| name: Performance Full (py3.14) | ||
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'push' |
There was a problem hiding this comment.
Updated in commit 2e1d1c7: removed the unnecessary job condition.
This adds a dedicated performance suite for the RFC 3987 parser helpers so parser construction cost, parse throughput, and memory usage can be compared over time. The benchmarks are deterministic, separately runnable, and wired into CI as report-only smoke/full jobs with machine-readable output.
Benchmark suite
tests/test_perf.pywith a separateperfmarkerms/opops/sparse,is_valid_syntaxis_valid_syntax_*Deterministic corpus + reporting
larkversionPytest configuration
perfmarker inpyproject.toml-m "not perf"CI strategy
Example benchmark invocation: