chia7712 merged PR #16231:
URL: https://github.com/apache/kafka/pull/16231
--
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
chia7712 commented on PR #16231:
URL: https://github.com/apache/kafka/pull/16231#issuecomment-2164203749
@brandboat could you please remove `Microbenchmarks` from suppression file?
https://github.com/apache/kafka/blob/6d1f8f8727e8f9c7071b83b7dd9feb840d8d661f/checkstyle/suppressions.xm
brandboat commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1636735297
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java:
##
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) u
chia7712 commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1636551418
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java:
##
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) un
brandboat commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1636528480
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java:
##
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) u
chia7712 commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1635345881
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java:
##
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) un
brandboat commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1634621966
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java:
##
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) u
brandboat commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1634619526
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java:
##
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) u
chia7712 commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1633997795
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java:
##
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) un
brandboat commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1633639458
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java:
##
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) u
chia7712 commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1632358803
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java:
##
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) un
brandboat commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1632327595
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java:
##
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) un
chia7712 commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1632145191
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ConcurrentMapBenchmark.java:
##
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) und
brandboat commented on PR #16231:
URL: https://github.com/apache/kafka/pull/16231#issuecomment-2156132892
Modified a couple of things in the latest commit:
1. Add computeIfAbsent in each benchmark since in the code base we use both
get and computeIfAbsent in CopyOnWriteMap, and we want to
chia7712 commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1631762230
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/java/MapBenchmark.java:
##
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or
chia7712 commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1631762044
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/java/BasicBenchmark.java:
##
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one o
chia7712 commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1631122382
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/java/MapBenchmark.java:
##
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or
chia7712 commented on code in PR #16231:
URL: https://github.com/apache/kafka/pull/16231#discussion_r1631120404
##
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/java/MapBenchmark.java:
##
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or
chia7712 commented on PR #16231:
URL: https://github.com/apache/kafka/pull/16231#issuecomment-2154237763
Maybe we should focus on the methods used in code base.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL
TaiJuWu commented on PR #16231:
URL: https://github.com/apache/kafka/pull/16231#issuecomment-2154228895
> ```
> MapBenchmark.testCopyOnWriteMap avgt 15 3518087.394 ± 167618.482
ns/op
> MapBenchmark.testHashMapavgt 15 3284793.930 ± 288361.593
ns/op
> ```
>
TaiJuWu commented on PR #16231:
URL: https://github.com/apache/kafka/pull/16231#issuecomment-2154221235
Could you share why `testConcurrentHashMap` is faster than `testHashMap`?
It is not reasonable for me, in my mind the work of `ConcurrentHashMap`
should be large than `HashMap`. because
chia7712 commented on PR #16231:
URL: https://github.com/apache/kafka/pull/16231#issuecomment-2152989568
```
MapBenchmark.testCopyOnWriteMap avgt 15 3518087.394 ± 167618.482
ns/op
MapBenchmark.testHashMapavgt 15 3284793.930 ± 288361.593
ns/op
```
it seems
chia7712 commented on PR #16231:
URL: https://github.com/apache/kafka/pull/16231#issuecomment-2152987819
@brandboat thanks for this patch. It would be nice that you add "how to
reproduce the benchmark result" to the description.
--
This is an automated message from the Apache Git Service.
brandboat opened a new pull request, #16231:
URL: https://github.com/apache/kafka/pull/16231
related to https://issues.apache.org/jira/browse/KAFKA-12708
benchmark output is here:
```
BenchmarkMode Cnt Score Error Units
LockBenchmark.testReentrant
24 matches
Mail list logo