package bench; import java.util.List; public class BenchConfig { public enum Mode { DURATION, EVENTS } private int threads = Runtime.getRuntime().availableProcessors(); 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 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 getConfigs() { return configs; } public void setConfigs(List configs) { this.configs = configs; } public String getOutputFile() { return outputFile; } public void setOutputFile(String outputFile) { this.outputFile = outputFile; } public String generateMessage() { return "X".repeat(messageSize); } }