GitHub user original-brownbear opened a pull request:
https://github.com/apache/kafka/pull/2903
MINOR: Fix needless GC + Result time unit in JMH
Fixes two issues with the JMH benchmark example:
* Trivial: The output should be in `ops/ms` for readability reasons (it's
in the millions of operations per second)
* Important: The benchmark is not actually measuring the LRU-Cache
performance as most of the time in each run is wasted on concatenating `key +
counter` as well as `value + counter`. Fixed by pre-generating 10k K-V pairs
(100x the cache capacity) and iterating over them. This brings the performance
up by a factor of more than 5 on a standard 4 core i7 (`~6k/ms` before goes to
`~35k/ms`).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/original-brownbear/kafka fix-jmh-example
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/2903.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2903
----
commit 8d30ef0f3e35f1fa03e035796f4e4d125bde4548
Author: Armin Braun <[email protected]>
Date: 2017-04-24T06:50:57Z
MINOR: Fix needless GC + Result time unit in JMH
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---