-
Notifications
You must be signed in to change notification settings - Fork 5
Implement native protocol parsing #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
antonagestam
wants to merge
10
commits into
Aiven-Open:main
Choose a base branch
from
antonagestam:feature/rust-backed-serialization
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
590b925
feat: switch build backend to maturin
aiven-anton 5340a2c
feat: implement Rust wire-format readers
aiven-anton 22a2a22
feat: implement native entity schema compiler and parser
aiven-anton 9f30f58
feat: expose native extension as the Python parsing API
aiven-anton 470de15
refactor: convert nominal string types to phantom types
aiven-anton d2e96a9
test: extend serial reader test coverage
aiven-anton ab504e6
ci: add Rust toolchain setup, cargo fmt and clippy
aiven-anton dcdeea7
feat: add parsing speed and memory benchmarks
aiven-anton d32a4a6
docs: hard-code serial API reference for native-backed readers
aiven-anton ec51ce0
fix: Build Sphinx docs from installed package
aiven-anton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -142,3 +142,6 @@ dmypy.json | |
| /schema/ | ||
| error-codes.txt | ||
| src/kio/_version.py | ||
|
|
||
| # Maturin | ||
| src/kio/lib_kio_native.dylib.dSYM/ | ||
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
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
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
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,134 @@ | ||||||
| """ | ||||||
| Large flexible `MetadataResponse` parse micro-benchmark. | ||||||
|
|
||||||
| Reproduce and compare branches (after rebuilding the extension, e.g. ``maturin develop --release``):: | ||||||
|
|
||||||
| PYTHONPATH=src python benchmarks/parsing.py --fast -o /tmp/kio-parse-main.json # on main | ||||||
| PYTHONPATH=src python benchmarks/parsing.py --fast -o /tmp/kio-parse-branch.json # on your branch | ||||||
| python -m pyperf compare_to /tmp/kio-parse-main.json /tmp/kio-parse-branch.json | ||||||
|
|
||||||
| Use ``--rigorous`` instead of ``--fast`` when you need stable numbers; run outside a sandbox | ||||||
| if ``pyperf`` fails collecting load average metadata. | ||||||
| """ | ||||||
|
|
||||||
| from __future__ import annotations | ||||||
|
|
||||||
| import datetime | ||||||
| import io | ||||||
| import uuid | ||||||
|
|
||||||
| from copy import replace | ||||||
|
||||||
| from copy import replace | |
| from dataclasses import replace |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyproject.tomlsets the PEP 517 build backend tobuild_kio(frombuild_kio.py), butMANIFEST.inexcludesbuild_kio.py. This will break builds from an sdist because the backend module won't be present when pip tries to import it. Includebuild_kio.pyin the sdist/wheel inputs (remove this exclude or explicitly include it).