diff options
Diffstat (limited to 'src/main/java/bench/BenchConfig.java')
| -rw-r--r-- | src/main/java/bench/BenchConfig.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/main/java/bench/BenchConfig.java b/src/main/java/bench/BenchConfig.java new file mode 100644 index 0000000..cc73444 --- /dev/null +++ b/src/main/java/bench/BenchConfig.java @@ -0,0 +1,48 @@ +package bench; + +import java.util.List; + +public class BenchConfig { + public enum Mode { DURATION, EVENTS } + + private int threads = 10; + private Mode mode = Mode.DURATION; + private long durationSeconds = 10; + private long totalEvents = 1_000_000; + private long warmupSeconds = 3; + private int messageSize = 100; + private List<String> configs = List.of( + "sync-immediate", "sync-buffered", + "async-1k", "async-4k", "async-10k", + "asyncapp-1k", "asyncapp-4k", "asyncapp-10k" + ); + private String outputFile = null; + + public int getThreads() { return threads; } + public void setThreads(int threads) { this.threads = threads; } + + public Mode getMode() { return mode; } + public void setMode(Mode mode) { this.mode = mode; } + + public long getDurationSeconds() { return durationSeconds; } + public void setDurationSeconds(long durationSeconds) { this.durationSeconds = durationSeconds; } + + public long getTotalEvents() { return totalEvents; } + public void setTotalEvents(long totalEvents) { this.totalEvents = totalEvents; } + + public long getWarmupSeconds() { return warmupSeconds; } + public void setWarmupSeconds(long warmupSeconds) { this.warmupSeconds = warmupSeconds; } + + public int getMessageSize() { return messageSize; } + public void setMessageSize(int messageSize) { this.messageSize = messageSize; } + + public List<String> getConfigs() { return configs; } + public void setConfigs(List<String> configs) { this.configs = configs; } + + public String getOutputFile() { return outputFile; } + public void setOutputFile(String outputFile) { this.outputFile = outputFile; } + + public String generateMessage() { + return "X".repeat(messageSize); + } +} |
