Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the hidden rpk benchmark CLI into a subcommand-based structure (starting with produce) and updates the ducktape RpkBenchmarkService wrapper + tests to invoke the new CLI shape. It also introduces new topic-handling flexibility in the CLI via --reset-topic and --use-existing-topic.
Changes:
- Refactor
rpk benchmarkintorpk benchmark produce, moving produce logic into a newproduce.gocommand implementation. - Add topic lifecycle options (
--reset-topic,--use-existing-topic) and refactor shared benchmark setup/teardown into reusable helpers. - Update ducktape service wrapper and tests/perf harnesses to pass a benchmark
mode(currently"produce").
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/rptest/tests/rpk_benchmark_service_test.py | Refactors smoke test helper and updates test to run produce mode. |
| tests/rptest/services/rpk_benchmark_service.py | Updates rpk invocation to benchmark <mode> and plumbs mode through service. |
| tests/rptest/perf/rpk_benchmark_test.py | Updates perf test harness to run the benchmark with an explicit mode. |
| src/go/rpk/pkg/cli/benchmark/benchmark.go | Introduces shared benchmark config/run lifecycle, topic setup options, and hooks in subcommands. |
| src/go/rpk/pkg/cli/benchmark/produce.go | Adds the benchmark produce subcommand implementation. |
| src/go/rpk/pkg/cli/benchmark/BUILD | Adds produce.go to the Bazel target sources. |
Collaborator
Retry command for Build#82536please wait until all jobs are finished before running the slash command |
Collaborator
graham-rp
reviewed
Apr 6, 2026
Contributor
graham-rp
left a comment
There was a problem hiding this comment.
It looks like this breaks existing behavior (rpk benchmark now errors out). Would rpk benchmark --mode work instead?
Member
Author
|
Yes, this changes that intentionally. No need to maintain that. |
Make the current (and only) produce mode be explicit by requiring a "produce" subcommand. This is in preparation for adding "consume".
Pure non-functional refactor of moving everything purely produce related to its own file and into subfunctions. Again in preparation for adding other subcommands like consume.
When cancelling the command we delete the test topic we created. Sometimes the topic might still leak (SIGKILL or rpk is killed during topic creation before RP has responded). Provide a `--reset-topic` flag which deletes and recreates the topic similar to what OMB provides.
Add a flag to use a prexisting topic. Can sometimes be useful for various reasons (existing data etc.).
822fef8 to
986b62e
Compare
Member
Author
|
Pure rebase |
graham-rp
approved these changes
Apr 7, 2026
travisdowns
approved these changes
Apr 7, 2026
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.
Non-functional refactor of rpk benchmark to prepare for introduction of other subcommands like consume.
Plus two commits on top to add some more freedom in regards to topic selection (reset and preexisting).
Backports Required
Release Notes