GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add JMH benchmarks (CAE-2930) by ggivo · Pull Request #4523 · redis/jedis

Conversation

@ggivo

@ggivo ggivo commented May 12, 2026 •
edited by cursor Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

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.

All reactions
@ggivo
Add JMH benchmarks for protocol reads with baseline/cache-aware compa…
7961c85
…risons
@jit-ci

jit-ci Bot commented May 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented May 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ggivo added 5 commits May 12, 2026 17:40
@ggivo
actions/cache@v5
de05612
@ggivo
bump actions
01074aa
@ggivo
enable auto push
18791f3
@ggivo
recreate Redis stream before each benchmark
717804e
@ggivo
push benchmark data to dedicated branch
5a01eab
@ggivo
ggivo force-pushed the topic/ggivo/CAE-2930-setup-benchmark-nightly branch from df14ad1 to 5a01eab Compare May 13, 2026 04:59
ggivo added 15 commits May 13, 2026 08:33
@ggivo
docs: include benchmarks dashboard and add manual dispatch with deplo…
416a1ab
…y toggle
@ggivo
migrate CRC16Benchmark to JMH
2dfbf63
@ggivo
add manula JMH runner
5693882
@ggivo
migrate SafeEncoderBenchmark
b8323b6
@ggivo
add README
712c368
@ggivo
migrate JedisGetSetBenchmark
ba10a11
@ggivo
unify default CI and manual runner
f8505d6
@ggivo
bootstrap redis test env
ff09fb5
@ggivo
Merge remote-tracking branch 'origin/master' into topic/ggivo/CAE-293…
1d3b037
…0-setup-benchmark-nightly
@ggivo
migrate RedisClientBenchmark.java
afab233
migrate PipelinedGetSetBenchmark.java
@ggivo
remove already migrated ProtocolBenchmark.java
efeaa5e
@ggivo
add GetSetMixedR90W10Benchmarks
8af4e43
  Workload benchmark: mixed GET/SET at 90% read / 10% write.
  Provides a single comparable throughput number per client configuration:
@ggivo
drop RedisClientCSCBenchmark covered by GetSetMixedR90W10 workload be…
44c1634
…nchmark
@ggivo
migrate PoolBenchmark.java
0f9d546
@ggivo
test(jmh): add PubSubPushBenchmark for end-to-end publish→onMessage r…
a300a3e
…ound-trip throughput
@ggivo ggivo changed the title Add JMH benchmarks for protocol reads with baseline/cache-aware comparisons Add JMH benchmarks May 14, 2026
@ggivo
ggivo marked this pull request as ready for review May 14, 2026 06:02
@ggivo
ggivo requested review from atakavci and uglide and removed request for uglide May 14, 2026 06:02
cursor[bot]
cursor Bot reviewed May 14, 2026
View reviewed changes
Comment thread src/test/jmh/redis/clients/jedis/benchmark/CRC16Benchmark.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/docs.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ggivo ggivo changed the title Add JMH benchmarks Add JMH benchmarks (CAE-2930) May 14, 2026
ggivo added 3 commits May 14, 2026 10:23
@ggivo
address review comment for overflow
958d9fc
@ggivo
format
4cc7746
@ggivo
clean up
5cf030d
cursor[bot]
cursor Bot reviewed May 14, 2026
View reviewed changes
Comment thread src/test/jmh/redis/clients/jedis/benchmark/SafeEncoderBenchmark.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

uglide
uglide reviewed May 14, 2026
View reviewed changes

@uglide uglide left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
Comment thread .github/workflows/benchmarks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/benchmarks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/test/jmh/redis/clients/jedis/benchmark/ProtocolReadBenchmark.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/test/jmh/redis/clients/jedis/benchmark/workload/GetSetMixedR90W10Benchmark.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

ggivo added 6 commits May 14, 2026 14:35
@ggivo
remove unnecessary JVM_OPTS: -Xmx3200m
e07e851
@ggivo
silence RESP3 protocol warning
51df63e
@ggivo
address review comment - Integer counter overflow
f5bf271
@ggivo
Merge branch 'master' into topic/ggivo/CAE-2930-setup-benchmark-nightly
08e1f83
@ggivo
pin test server version to 8.2.6
a726292
@ggivo
keep old benchmarks for comparison with previous versions
5045cc4
clean up
cursor[bot]
cursor Bot reviewed May 15, 2026
View reviewed changes
Comment thread .github/workflows/docs.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/test/jmh/redis/clients/jedis/benchmark/ProtocolReadBenchmark.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

ggivo added 6 commits May 15, 2026 19:50
@ggivo
simplify SafeEncodeBenchmark use single string
38ad237
@ggivo
format SafeEncodeBenchmark
9035c23
@ggivo
address Level.Invocation unsuitable for nanosecond-scale protocol ben…
9442729
…chmarks
@ggivo
format
22c695a
@ggivo
enforce checkout & build docs from master
410056b
@ggivo
Merge branch 'master' into topic/ggivo/CAE-2930-setup-benchmark-nightly
7b57c57
@ggivo
ggivo requested a review from uglide May 15, 2026 19:56
ggivo added 2 commits May 27, 2026 17:27
@ggivo
Merge remote-tracking branch 'origin/master' into topic/ggivo/CAE-293…
6745938
…0-setup-benchmark-nightly

# Conflicts:
#	pom.xml
@ggivo
Merge branch 'master' into topic/ggivo/CAE-2930-setup-benchmark-nightly
8737a0c
cursor[bot]
cursor Bot reviewed May 27, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

Fix All in Cursor

❌ 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.

All reactions
Comment thread src/test/jmh/redis/clients/jedis/benchmark/workload/GetSetMixedR90W10Benchmark.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

ggivo added 3 commits May 27, 2026 18:36
@ggivo
Use distinct per-thread seeds in GetSetMixedR90W10Benchmark Rng
b371c34
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).
@ggivo
Migrate ReadBenchmark/ReadPushesBenchmark to PushConsumerChain API
77dbcfe
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.
@ggivo
Merge branch 'master' into topic/ggivo/CAE-2930-setup-benchmark-nightly
2ba6c50
@ggivo
ggivo merged commit 01011c0 into master May 27, 2026
20 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ggivo
ggivo deleted the topic/ggivo/CAE-2930-setup-benchmark-nightly branch May 27, 2026 17:03
@ggivo ggivo added testing maintenance labels Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@atakavci atakavci Awaiting requested review from atakavci
@uglide uglide Awaiting requested review from uglide
1 more reviewer
@cursor cursor[bot] cursor[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

maintenance testing

Projects

None yet

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.

2 participants

@ggivo @uglide
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.