kafka
kafka copied to clipboard
KAFKA-17023: add PCollectionsImmutableMap to ConcurrentMapBenchmark
*More detailed description of your change, Add SingleWriteMultiReadBenchmark for ConcurrentHashMap, CopyOnWriteMap, PcollectionsImmutableMap
Running Command:
./jmh-benchmarks/jmh.sh org.apache.kafka.jmh.util.SingleWriteMultiReadBenchmar
Test result:
Benchmark (mapSize) (writePercentage) Mode Cnt Score Error Units
SingleWriteMultiReadBenchmark.ConcurrentHashMap 100 0.1 avgt 5 5551.856 ± 5184.034 ns/op
SingleWriteMultiReadBenchmark.ConcurrentHashMap:testConcurrentHashMapEntry 100 0.1 avgt 5 12631.454 ± 11665.343 ns/op
SingleWriteMultiReadBenchmark.ConcurrentHashMap:testConcurrentHashMapGet 100 0.1 avgt 5 50.020 ± 51.794 ns/op
SingleWriteMultiReadBenchmark.ConcurrentHashMap:testConcurrentHashMapRandomGet 100 0.1 avgt 5 82.140 ± 111.144 ns/op
SingleWriteMultiReadBenchmark.ConcurrentHashMap:testConcurrentHashMapValues 100 0.1 avgt 5 9998.994 ± 9485.352 ns/op
SingleWriteMultiReadBenchmark.ConcurrentHashMap:testConcurrentHashMapWrite 100 0.1 avgt 5 ≈ 10⁻⁴ ns/op
SingleWriteMultiReadBenchmark.CopyOnWriteMap 100 0.1 avgt 5 3571.190 ± 2335.478 ns/op
SingleWriteMultiReadBenchmark.CopyOnWriteMap:testCopyOnWriteMapEntry 100 0.1 avgt 5 8741.245 ± 5825.625 ns/op
SingleWriteMultiReadBenchmark.CopyOnWriteMap:testCopyOnWriteMapGet 100 0.1 avgt 5 43.997 ± 27.091 ns/op
SingleWriteMultiReadBenchmark.CopyOnWriteMap:testCopyOnWriteMapRandomGet 100 0.1 avgt 5 72.952 ± 69.792 ns/op
SingleWriteMultiReadBenchmark.CopyOnWriteMap:testCopyOnWriteMapValues 100 0.1 avgt 5 5783.686 ± 3656.257 ns/op
SingleWriteMultiReadBenchmark.CopyOnWriteMap:testCopyOnWriteMapWrite 100 0.1 avgt 5 0.001 ± 0.008 ns/op
SingleWriteMultiReadBenchmark.PcollectionsImmutableMap 100 0.1 avgt 5 5529.729 ± 1322.872 ns/op
SingleWriteMultiReadBenchmark.PcollectionsImmutableMap:testPcollectionsImmutableMapEntry 100 0.1 avgt 5 9151.719 ± 3652.206 ns/op
SingleWriteMultiReadBenchmark.PcollectionsImmutableMap:testPcollectionsImmutableMapGet 100 0.1 avgt 5 202.152 ± 85.313 ns/op
SingleWriteMultiReadBenchmark.PcollectionsImmutableMap:testPcollectionsImmutableMapRandomGet 100 0.1 avgt 5 320.565 ± 89.311 ns/op
SingleWriteMultiReadBenchmark.PcollectionsImmutableMap:testPcollectionsImmutableMapValues 100 0.1 avgt 5 12997.451 ± 2356.417 ns/op
SingleWriteMultiReadBenchmark.PcollectionsImmutableMap:testPcollectionsImmutableMapWrite 100 0.1 avgt 5 0.001 ± 0.004 ns/op
*Summary of testing strategy (including rationale)
Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)