tests/benchmarks: Add VectorType deserialization benchmarks and expand test coverage#733
Draft
mykaul wants to merge 3 commits intoscylladb:masterfrom
Draft
tests/benchmarks: Add VectorType deserialization benchmarks and expand test coverage#733mykaul wants to merge 3 commits intoscylladb:masterfrom
mykaul wants to merge 3 commits intoscylladb:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds new benchmark and test coverage around VectorType deserialization, and refreshes integration test formatting to support vector-related testing scenarios.
Changes:
- Add a new
benchmarks/vector_deserialize.pyharness comparing multiple vector deserialization strategies across sizes/types. - Add unit tests for
VectorTypelarge-vector deserialization and intended Cython fallback behavior. - Reformat/clean up
tests/integration/standard/test_types.py(imports/string literals/line wrapping) and keep vector test class enabled via@requires_vector_type.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| tests/unit/test_types.py | Adds new unit tests for vector deserialization behavior (including a Cython-deserializer expectation). |
| tests/integration/standard/test_types.py | Largely formatting/refactoring; keeps/organizes vector integration tests under @requires_vector_type. |
| benchmarks/vector_deserialize.py | New benchmark script to measure vector deserialization performance across approaches and configurations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Mar 14, 2026
c78c033 to
3775e35
Compare
8 tasks
3d5cdd0 to
0ae255c
Compare
…nce benchmarks Add benchmark scripts for measuring VectorType serialization and deserialization performance across various vector sizes and numeric types (float, double, int32, int64, short). vector_deserialize.py compares Python struct.unpack baseline, Cython DesVectorType deserializer, and numpy-accelerated path. vector_serialize.py compares current VectorType.serialize() baseline, Python struct.pack with batch format string, and BoundStatement.bind() end-to-end. Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
…y large vector deserialization Add test_vector_cython_deserializer_variable_size_subtype to verify that DesVectorType correctly raises ValueError for variable-size subtypes (e.g. UTF8Type) and that the pure Python path handles them. Add test_vector_numpy_large_deserialization to exercise the numpy deserialization path for vectors with >= 32 elements across all supported numeric types (float, double, int32, int64). Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
NotImplemented is a special singleton used for binary operator fallback, not an exception class. Using 'raise NotImplemented(...)' would raise TypeError instead of the intended error. Replace with NotImplementedError.
0ae255c to
7cbc15c
Compare
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.
Summary
Commits (4)
1. benchmarks: Add VectorType deserialization performance benchmark
New
benchmarks/vector_deserialize.py(320 lines) testing:VectorType.deserialize(), rawstruct.unpack,numpy.frombuffer().tolist(), CythonDesVectorType2. benchmarks: expand vector sizes
Add double[768], double[1536], int32[64] configurations.
3. tests: enable vector integration tests on Scylla 2025.4+
Re-enable vector integration tests that were previously skipped for Scylla. Tested against Scylla 2025.4.2 and 2026.1.
4. tests: add coverage for variable-size VectorType Cython fallback and numpy large vector deserialization
DesVectorTyperaisesValueErrorfor variable-size subtypes (UTF8Type) while pure Python handles themNo production code changes — benchmark and test files only.