lhotari commented on PR #24457: URL: https://github.com/apache/pulsar/pull/24457#issuecomment-3003732665
> I changed `TopicName`'s constructor to public and add a separated test: > > ```java > @Warmup(iterations = 10, time = 500, timeUnit = TimeUnit.MILLISECONDS) > @Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS) > @Benchmark > public void testNoCache() { > for (int i = 0; i < 1000000; i++) { > new TopicName("test-" + i); > } > } > ``` @BewareMyPower This is an invalid JMH test case. In JMH, you need to use the "black hole" to consume computed values. For example: ```java @Warmup(iterations = 10, time = 500, timeUnit = TimeUnit.MILLISECONDS) @Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS) @Benchmark public void testNoCache(Blackhole blackhole) { for (int i = 0; i < 1000000; i++) { blackhole.consume(new TopicName("test-" + i)); } } ``` -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org