YangSiJun528 opened a new pull request, #2441:
URL: https://github.com/apache/iggy/pull/2441

   ### Overview
   This PR introduces JMH microbenchmark infrastructure for the Java SDK with a 
simple demo benchmark.
   
   Related issue: #2228
   
   ### Changes
   - Added JMH 1.37 dependencies and `iggy-microbenchmarks` subproject
   - Configured Gradle task: `./gradlew :iggy-microbenchmarks:jmh`
   - Added checkstyle suppressions and logback configuration for 
`iggy-microbenchmarks`
   - Added `SimpleDemoMicrobenchmark` - Simple demo showing JMH setup
   - Added `foreign/java/microbenchmarks/README.md` with usage examples and 
notes
   
   ### Why Only a Simple Demo?
   Initially included comprehensive integration benchmarks (send/poll with 
Testcontainers, at aa072a8), but removed due to:
   - Results were non-deterministic and unreliable due to network I/O and 
external dependencies
   - JMH is optimized for deterministic CPU-bound operations, not I/O-heavy 
workloads with external dependencies
   
   Looking at how other projects like Apache Kafka and Pulsar use JMH, their 
benchmarks avoid I/O-bound operations and focus on CPU-intensive tasks.
   
   So, keep only the demo for now. Future additions should focus on 
JMH-appropriate operations like serialization, parsing, and encoding/decoding 
logic.
   
   For integration performance testing with I/O operations, I think we can 
create and use a separate custom benchmark framework instead of JMH. - #2229
   
   ### Usage
   ```bash
   ./gradlew :iggy-microbenchmarks:jmh
   ./gradlew :iggy-microbenchmarks:jmh -PjmhArgs="SimpleDemo -prof gc"
   ```
   
   See `foreign/java/microbenchmarks/README.md` for more options.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to