jmeter-prometheus-plugin icon indicating copy to clipboard operation
jmeter-prometheus-plugin copied to clipboard

Performance issue on high thread count scenarios

Open loadtestingru opened this issue 3 years ago • 1 comments

During load test with about 2k threads about 30% of all threads are blocked at: com.github.johrstrom.collector.JMeterCollectorRegistry#getOrCreateAndRegister(BaseCollectorConfig cfg)

What is thre reason here to use synchronized method? registered is alread ConcurrentHashMap.

You can use registered.computeIfAbsent(BaseCollectorConfig key, Function<BaseCollectorConfig, Collector> mappingFunction) And threads will not be blocked on each method call after first key creation.

loadtestingru avatar May 12 '22 13:05 loadtestingru

Hi! Thanks for the issue and the potential fix. I however, don't actively maintain this much anymore so am unlikely to do the work. Happy to evaluate and potentially merge a pull request though!

johrstrom avatar May 12 '22 13:05 johrstrom