Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-14 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-12 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-12 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-12 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-12 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-11 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-11 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-11 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-10 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-10 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-09 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-09 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-08 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-08 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-07 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-07 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-07 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-07 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-07 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-07 Thread via GitHub
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 > ``` >

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-07 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-06 Thread via GitHub
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

Re: [PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-06 Thread via GitHub
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.

[PR] KAFKA-12708 Rewrite org.apache.kafka.test.Microbenchmarks by JMH [kafka]

2024-06-06 Thread via GitHub
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