diff --git a/java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java b/java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java index 95d3a8ffac..8b4245ab62 100644 --- a/java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java +++ b/java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java @@ -220,7 +220,7 @@ public static void testClientSetGet( concurrentNum, clientCount, tasks.size()); } long before = System.nanoTime(); - ExecutorService threadPool = Executors.newFixedThreadPool(concurrentNum); + ExecutorService threadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()); // create threads and add them to the async pool. // This will start execution of all the concurrent tasks.