chia7712 commented on code in PR #16425: URL: https://github.com/apache/kafka/pull/16425#discussion_r1650346962
########## jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java: ########## @@ -189,4 +194,60 @@ public void testCopyOnWriteMapEntrySet(Blackhole blackhole) { } } } + + @Benchmark + @OperationsPerInvocation(TIMES) + public void testPCollectionsImmutableMapGet(Blackhole blackhole) { + for (int i = 0; i < TIMES; i++) { + if (i % writePerLoops == 0) { + // add offset mapSize to ensure computeIfAbsent do add new entry + pcollectionsImmutableMap = pcollectionsImmutableMap.updated(i + mapSize, 0); Review Comment: so could you please add single-write/multi-read scenario for those maps? That is a existent use case in kafka -- 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