Repository navigation
test: add pooler SELECT 1 microbench; mimics existing e2e pooler - #2035
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
|
Metal bench (arm64) failed. 5 of 517 measures outside bounds.
Counters per txn
Microbench: 499 of 504 measures within bounds. Hot code per txn
pooler:
sharding-w2:
Logslb, microbench, pooler, sharding-w2, sharding-w8, verdict.json |
Contributor
|
Metal bench (x86) passed. All 517 measures within bounds.
Counters per txn
Microbench: all 504 measures within bounds. Hot code per txn
pooler:
sharding-w2:
Logslb, microbench, pooler, sharding-w2, sharding-w8, verdict.json |
jkaczman
force-pushed
the
jk-pooler-microbench
branch
from
November 14, 2026 03:50
5bb8ba3 to
3ec9b78
Compare
jkaczman
added a commit
that referenced
this pull request
Nov 14, 2026
…SERT, etc (#2036) Previously, with `query_parser` set to auto or session_control, we were running the session control regex on all queries to look for SET, BEGIN, COMMIT, etc. This includes queries such as SELECT 1. In the pooler microbench flamegraph (#2035), the check was a pretty substantial amount (see below): <img width="1440" height="672" alt="Screenshot 2026-11-13 at 2 23 54 PM" src="https://github.com/user-attachments/assets/75979eef-1020-47fc-a440-8f4036cdfa3e" /> Now, if the query starts with SELECT, INSERT, UPDATE, DELETE or WITH, we return early and skip the expensive regex call. How can we do this? All of the session control patterns occur at the very start of the query text (**when there's no whitespace / comment present**); i.e., if we have a query that starts with a keyword like `SELECT`, which isn't in the `CMD_BASE` keywords, there's no point in trying to match with `CMD_RE`. `session_control_and_locks` behavior not changed
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.
Previously, all of our microbench cases ran via sharded config, which uses the query parser and router for all requests.
Now, this introduces a
SELECT 1microbench case that uses pooler config to emulate what our end-to-endpoolerbenchmark does. Specifically, this uses simple protocol and the full request variation of microbench (fake in-memory server)This allows greater visibility into this specific case, so that we can easily flamegraph it to inspect and make targeted optimizations to improve the regular
poolerend-to-end bench.