GeezerVison is showing github.com — Add JMH benchmarks (CAE-2930) by ggivo · Pull Request #4523 · redis/jedis
Conversation
ggivo
commented
May 12, 2026
•
edited by cursor
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
JMH benchmark migration & expansion
Migrates legacy manual benchmarks to a unified JMH suite and adds new workload and pub/sub coverage.
Added benchmarks
CRC16Benchmark — hash slot CRC16 computation (string + byte[] paths).
SafeEncoderBenchmark — UTF-8 encode/decode hot paths.
ProtocolReadBenchmark — RESP2/RESP3 parser throughput, including cache-aware and push-frame variants.
JedisGetSetBenchmark — single-threaded GET/SET + pipelined GET/SET baseline using Jedis.
RedisClientGetSetBenchmark — pooled GET/SET + pipelined GET/SET using RedisClient at T1 / T8 / T64.
GetSetMixedR90W10Benchmark — fixed 90/10 read/write workload over a 1000-key working set; emits comparable troughput numbers for Jedis (T1), JedisPool (T1/T8), RedisClient (T1/T8), and RedisClient + client-side che (T1/T8). Replaces the legacy PoolBenchmark and RedisClientCSCBenchmark.
PubSubPushBenchmark — end-to-end publish → onMessage round-trip throughput, complementing the protocolReadBenchmark` push-frame microbenchmark.
Infrastructure
JmhMain IDE launcher with per-suite include patterns.
- Maven
jmh profile wires src/test/jmh as an additional test-source root and runs JMH with JSON result output.
Example CI run
https://github.com/redis/jedis/actions/runs/25842479419/job/75930489878
Note Low Risk
Changes are test-only and CI/docs wiring; production library code is untouched. CI grants contents: write for benchmark auto-push, and several benchmarks flush Redis—acceptable for dedicated CI Redis only.
Overview
Adds a JMH benchmark suite under src/test/jmh and wires it into Maven and GitHub Actions so performance can be measured and tracked over time.
Build & run: pom.xml adds JMH test dependencies and a -Pjmh profile that registers src/test/jmh, skips normal unit/integration tests, and runs org.openjdk.jmh.Main with JSON written to benchmarks.json (per-benchmark annotations control mode/warmup; CLI does not override them). JmhMain supports IDE runs; CyclingInputStream reduces allocation noise in protocol microbenchmarks.
Benchmark coverage (new): RESP read/encode and CSC push paths (ReadBenchmark, ReadPushesBenchmark, SendCommandBenchmark); CRC16Benchmark / SafeEncoderBenchmark; live-Redis GET/SET and pipelining for Jedis and pooled RedisClient (1/8/64 threads); fixed 90% read / 10% write workload comparing Jedis, JedisPool, RedisClient, and CSC (GetSetMixedR90W10Benchmark); end-to-end pub/sub round-trip (PubSubPushBenchmark). Several setups call FLUSHDB (documented as unsafe on shared Redis).
CI & docs: .github/workflows/benchmarks.yml replaces the placeholder with a nightly (and manual) job: Java 8, Docker Redis with password, mvn -Pjmh clean test, then github-action-benchmark auto-pushes results to the benchmark-data branch. docs.yml also builds on benchmark-data pushes and copies benchmark-data/jedis/* into the published site under benchmarks/.
Legacy src/test/java/.../CRC16Benchmark.java is only formatting; the JMH replacement lives under util/CRC16Benchmark.
Reviewed by Cursor Bugbot for commit 2ba6c50. Bugbot is set up for automated code reviews on this repo. Configure here.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
jit-ci
Bot
commented
May 12, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
🛡️ Jit Security Scan Results
✅ No security findings were detected in this PR
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Test Results
203 files ± 0 203 suites ±0 9m 21s ⏱️ -31s
7 755 tests - 12 6 469 ✅ - 1 236 1 286 💤 +1 224 0 ❌ ±0
7 763 runs - 24 6 469 ✅ - 1 256 1 294 💤 +1 232 0 ❌ ±0
Results for commit 2ba6c50. ± Comparison against base commit e82b456.
This pull request removes 14 and adds 2 tests. Note that renamed tests count towards both.
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest[1] ‑ testScorer(Scorer, double, double)[1][1]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest[1] ‑ testScorer(Scorer, double, double)[1][2]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest[1] ‑ testScorer(Scorer, double, double)[1][3]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest[1] ‑ testScorer(Scorer, double, double)[1][4]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest[1] ‑ testScorer(Scorer, double, double)[1][5]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest[1] ‑ testScorer(Scorer, double, double)[1][6]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest[1] ‑ testScorer(Scorer, double, double)[1][7]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest[2] ‑ testScorer(Scorer, double, double)[2][1]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest[2] ‑ testScorer(Scorer, double, double)[2][2]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest[2] ‑ testScorer(Scorer, double, double)[2][3]
…
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest ‑ testScorer(Scorer, double, double)[1]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest ‑ testScorer(Scorer, double, double)[2]
This pull request skips 1222 tests.
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArcountMissingKey()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArcountMissingKeyBinary()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArdel()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArdelBinary()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArdelrange()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArdelrangeBinary()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArget()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArgetBinary()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArgetrange()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArgetrangeBinary()[1]
…
♻️ This comment has been updated with latest results.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…0-setup-benchmark-nightly
migrate PipelinedGetSetBenchmark.java
Workload benchmark: mixed GET/SET at 90% read / 10% write.
Provides a single comparable throughput number per client configuration:
ggivo
changed the title
Add JMH benchmarks for protocol reads with baseline/cache-aware comparisons
Add JMH benchmarks
May 14, 2026
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ggivo
changed the title
Add JMH benchmarks
Add JMH benchmarks (CAE-2930)
May 14, 2026
Uh oh!
There was an error while loading. Please reload this page.
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.
Good initiative, but needs some polishing.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…0-setup-benchmark-nightly
# Conflicts:
# pom.xml
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8737a0c. Configure here.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
All threads shared the same SEED, generating identical key-index sequences
and forcing T8 variants into lockstep on a single key per iteration. Derive
each thread's seed from SEED + an AtomicInteger counter; per-run
reproducibility is preserved (counter resets per fork).
Protocol.read/readPushes no longer accept a Cache directly; the
cache-as-push-consumer role moved into PushConsumerChain. Wrap the
existing Cache in PushInvalidateConsumer + PushConsumerChainImpl so the
benchmarks still measure the realistic CSC read path.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
atakavci
Awaiting requested review from atakavci
uglide
Awaiting requested review from uglide
1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|