Add NBCROW row throughput benchmark - #292
Draft
Saurabh Singh (saurabh500) wants to merge 1 commit into
Draft
Conversation
Saurabh Singh (saurabh500)
force-pushed
the
dev/saurabh/nbcrow-throughput-benchmark
branch
from
August 14, 2026 16:34
14a00f2 to
03d37a1
Compare
Saurabh Singh (saurabh500)
changed the base branch from
copilot/share-nbcrow-null-bitmap
to
main
August 14, 2026 16:34
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Saurabh Singh (saurabh500)
force-pushed
the
dev/saurabh/nbcrow-throughput-benchmark
branch
from
August 14, 2026 16:36
03d37a1 to
801f413
Compare
| async fn connect_mock(address: SocketAddr) -> TdsClient { | ||
| let mut context = ClientContext::default(); | ||
| context.user_name = "sa".to_string(); | ||
| context.password = "MockBenchmark1!".to_string(); |
Contributor
Author
There was a problem hiding this comment.
This needs to be randomly generated. WE cannot have hardcoded literals in password
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.
Description
Adds an end-to-end Criterion benchmark for NBCROW row decoding through the loopback TDS transport and complete
next_rowpath. The matrix covers 4, 16, and 64 columns across fixed-width, text-heavy, and mixed rows with 25% NULLs and 10,000 rows per result set by default.The existing mock-server infrastructure now emits NBCROW tokens, fragments large responses into valid TDS packets, and caches immutable serialized responses before the timed loop so server-side serialization does not dominate the measurement.
This PR was originally stacked on #245. After #245 squash-merged as
77be0ff6, the benchmark commit was restacked ontomainso this PR contains only the issue #282 benchmark work.Benchmark throughput on the stacked implementation ranged from 1.08 M rows/s for 4-column fixed-width rows to 105 K rows/s for 64-column text-heavy rows. A controlled comparison against the
zeroed_bitmap-only implementation found all nine full-row decode deltas within the configured 5% Criterion noise threshold.Related Issues
Closes #282
Originally stacked on #245; now based on
mainbecause #245 merged.Checklist
cargo bfmtpassescargo bclippypassescargo btestpasses — attempted, but live SQL Server integration tests could not connect in the local environment; mock-specific tests passAdditional validation:
cargo nextest run -p mssql-mock-tds --all-targets --no-fail-fast— 20 passedcargo bench -p mssql-tds-bench --bench nbcrow_rows --no-runBENCH_NBC_ROWS=10000