summaryrefslogtreecommitdiff
path: root/src/main/java/bench/Main.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-01-09 23:57:11 +0200
committerPaul Buetow <paul@buetow.org>2026-01-09 23:57:11 +0200
commitb9bbc70fc6b3e577b5d3ed065939fd8ba2eeb767 (patch)
treeb139241e3a12d497570902aed9cd03b46614aa69 /src/main/java/bench/Main.java
parent6eeb44837e55f237925233ae4275b6f060ebb50f (diff)
Auto-detect CPU count for default thread countmain
Diffstat (limited to 'src/main/java/bench/Main.java')
-rw-r--r--src/main/java/bench/Main.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/bench/Main.java b/src/main/java/bench/Main.java
index a12c22b..565ae13 100644
--- a/src/main/java/bench/Main.java
+++ b/src/main/java/bench/Main.java
@@ -15,8 +15,8 @@ import java.util.concurrent.Callable;
description = "Benchmark Log4j2 logging throughput with various configurations")
public class Main implements Callable<Integer> {
- @Option(names = {"-t", "--threads"}, description = "Number of concurrent threads (default: 10)")
- private int threads = 10;
+ @Option(names = {"-t", "--threads"}, description = "Number of concurrent threads (default: available CPUs)")
+ private int threads = Runtime.getRuntime().availableProcessors();
@Option(names = {"-m", "--mode"}, description = "Test mode: duration or events (default: duration)")
private String mode = "duration";