divijvaidya opened a new pull request, #13307:
URL: https://github.com/apache/kafka/pull/13307

   # Motivation
   The current implementation of the benchmark may produce different set of 
integers across benchmarks and hence, may not provide apples to apples 
comparison.
   
   # Changes
   1. With this change, we initialize random number generator with a fixed seed 
at the start of a benchmark. This ensures that for each benchmark, random 
number generator produces the same sequence of random values. Hence, the input 
data across benchmarks would be consistent providing a reliable apples to 
apples comparison.
   2. We ensure that a new set of random numbers are generated per iteration, 
so that the bechmark calculation is performed over a diverse range of values
   
   Sample result of a benchmark run:
   ```
   Benchmark                                           Mode  Cnt     Score   
Error  Units
   ByteUtilsBenchmark.testSizeOfUnsignedVarint        thrpt   30  1302.193 ± 
0.396  ops/s
   ByteUtilsBenchmark.testSizeOfUnsignedVarintSimple  thrpt   30   328.678 ± 
0.269  ops/s
   ByteUtilsBenchmark.testSizeOfVarlong               thrpt   30   880.113 ± 
0.676  ops/s
   ByteUtilsBenchmark.testSizeOfVarlongSimple         thrpt   30   109.592 ± 
0.071  ops/s
   JMH benchmarks done
   ```


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to