Skip to content

feat(java): Implement CLI and resource provisioner for pinned producer benchmark#3159

Merged
mmodzelewski merged 9 commits into
apache:masterfrom
slbotbm:java-benchmarking-1
Apr 28, 2026
Merged

feat(java): Implement CLI and resource provisioner for pinned producer benchmark#3159
mmodzelewski merged 9 commits into
apache:masterfrom
slbotbm:java-benchmarking-1

Conversation

@slbotbm
Copy link
Copy Markdown
Contributor

@slbotbm slbotbm commented Apr 23, 2026

Which issue does this PR close?

Closes #

Rationale

This PR introduces the CLI for Pinned Producer benchmark, and the ResourceProvisioner class to create stream/topics on the server.

What changed?

org/apache/iggy/bench
  ├── IggyBench.java
  │   # Main entry point. 
  ├── benchmarks
  │   └── tcp
  │       └── async
  │           └── PinnedProducer.java
  │               # Benchmark runner shell for the pinned producer.# Holds global/per-benchmark args, delegates stream/topic setup to `ResourceProvisioner`,# and exposes `provisionResources()`. `run()` is currently empty; will have actual pinned producer actor.
  ├── cli
  │   ├── IggyBenchCommand.java
  │   │   # Root Picocli command for `iggy-bench`.
  │   │   # Defines shared CLI options like message sizing, batching, auth, warmup, sampling, and registers `PinnedProducerCommand` as a subcommand.
  │   └── PinnedProducerCommand.java
  │       # Picocli subcommand for the pinned producer benchmark.# Translates CLI flags into `GlobalCliArgs` and `PinnedProducerCliArgs`, validates them, provisions resources, then invokes the benchmark.
  ├── exception
  │   └── BenchmarkException.java
  ├── models
  │   ├── cli
  │   │   ├── GlobalCliArgs.java
  │   │   │   # Record holding shared benchmark configuration from the root CLI command.
  │   │   └── PinnedProducerCliArgs.java
  │   │       # Record holding pinned-producer-specific options.
  │   └── provision
  │       └── ProvisionedResources.java
  │           # Record describing the resources created or reused for a run.
  └── provision
      └── ResourceProvisioner.java
          # Creates or reuses benchmark streams/topics in Iggy before a run.
          # Logs in with blocking TCP client credentials, and creates/re-uses streams/topics.

Local Execution

  • Passed: ./gradlew :iggy-bench:run --args="pp"
  • Pre-commit hooks ran

AI Usage

If AI tools were used, please answer:

  1. Which tools? codex
  2. Scope of usage? code generation
  3. How did you verify the generated code works correctly? Ran it, read through and understood it myself.
  4. Can you explain every line of the code if asked? yes

@slbotbm slbotbm changed the title feat(java-bench): Implement CLI and resource provisioner for pinned producer feat(java): Implement CLI and resource provisioner for pinned producer benchmark Apr 23, 2026
@slbotbm slbotbm force-pushed the java-benchmarking-1 branch from e9f80eb to 5c4422e Compare April 23, 2026 18:12
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 0% with 147 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.50%. Comparing base (cca0e04) to head (a3d5a80).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ache/iggy/bench/provision/ResourceProvisioner.java 0.00% 40 Missing ⚠️
...g/apache/iggy/bench/cli/PinnedProducerCommand.java 0.00% 30 Missing ⚠️
...rg/apache/iggy/bench/models/cli/GlobalCliArgs.java 0.00% 30 Missing ⚠️
...va/org/apache/iggy/bench/cli/IggyBenchCommand.java 0.00% 18 Missing ⚠️
...e/iggy/bench/models/cli/PinnedProducerCliArgs.java 0.00% 12 Missing ⚠️
...h/benchmarks/tcp/async/TcpAsyncPinnedProducer.java 0.00% 9 Missing ⚠️
...pache/iggy/bench/exception/BenchmarkException.java 0.00% 4 Missing ⚠️
...src/main/java/org/apache/iggy/bench/IggyBench.java 0.00% 3 Missing ⚠️
...y/bench/models/provision/ProvisionedResources.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3159      +/-   ##
============================================
- Coverage     74.19%   73.50%   -0.70%     
  Complexity      943      943              
============================================
  Files          1150     1150              
  Lines        101886   101010     -876     
  Branches      79066    78061    -1005     
============================================
- Hits          75594    74243    -1351     
- Misses        23627    24107     +480     
+ Partials       2665     2660       -5     
Components Coverage Δ
Rust Core 74.56% <ø> (-0.76%) ⬇️
Java SDK 60.14% <0.00%> (-2.16%) ⬇️
C# SDK 69.38% <ø> (ø)
Python SDK 81.43% <ø> (ø)
Node SDK 91.53% <ø> (+0.01%) ⬆️
Go SDK 39.43% <ø> (ø)
Files with missing lines Coverage Δ
...y/bench/models/provision/ProvisionedResources.java 0.00% <0.00%> (ø)
...src/main/java/org/apache/iggy/bench/IggyBench.java 0.00% <0.00%> (ø)
...pache/iggy/bench/exception/BenchmarkException.java 0.00% <0.00%> (ø)
...h/benchmarks/tcp/async/TcpAsyncPinnedProducer.java 0.00% <0.00%> (ø)
...e/iggy/bench/models/cli/PinnedProducerCliArgs.java 0.00% <0.00%> (ø)
...va/org/apache/iggy/bench/cli/IggyBenchCommand.java 0.00% <0.00%> (ø)
...g/apache/iggy/bench/cli/PinnedProducerCommand.java 0.00% <0.00%> (ø)
...rg/apache/iggy/bench/models/cli/GlobalCliArgs.java 0.00% <0.00%> (ø)
...ache/iggy/bench/provision/ResourceProvisioner.java 0.00% <0.00%> (ø)

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread foreign/java/bench/src/main/java/org/apache/iggy/bench/cli/IggyBenchCommand.java Outdated
@slbotbm
Copy link
Copy Markdown
Contributor Author

slbotbm commented Apr 27, 2026

The latest commits enforce the mutual exclusitivity of --message-batches and --total-data through picocli. This was previously done using hand-rolled code.

Copy link
Copy Markdown
Member

@mmodzelewski mmodzelewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slbotbm Thanks for the PR. It looks good overall, just a few minor comments.

Comment thread foreign/java/bench/src/main/java/org/apache/iggy/bench/cli/IggyBenchCommand.java Outdated
Comment thread foreign/java/bench/src/main/java/org/apache/iggy/bench/IggyBench.java Outdated
Copy link
Copy Markdown
Contributor

@atharvalade atharvalade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything else lgtm

@mmodzelewski mmodzelewski merged commit eb20ac5 into apache:master Apr 28, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants