Skip to content

Commit 2e72467

Browse files
committed
Add --rpc-timeout argument to performance tool
Fixes #88
1 parent 30fb44a commit 2e72467

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/java/com/rabbitmq/stream/perf/StreamPerfTest.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,13 @@ public class StreamPerfTest implements Callable<Integer> {
340340
defaultValue = "false")
341341
private boolean environmentVariables;
342342

343+
@CommandLine.Option(
344+
names = {"--rpc-timeout", "-rt"},
345+
description = "RPC timeout in seconds",
346+
defaultValue = "10",
347+
converter = Utils.PositiveIntegerTypeConverter.class)
348+
private int rpcTimeout;
349+
343350
private MetricsCollector metricsCollector;
344351
private PerformanceMetrics performanceMetrics;
345352
private List<Monitoring> monitorings;
@@ -562,7 +569,8 @@ public Integer call() throws Exception {
562569
.codec(codec)
563570
.maxProducersByConnection(this.producersByConnection)
564571
.maxTrackingConsumersByConnection(this.trackingConsumersByConnection)
565-
.maxConsumersByConnection(this.consumersByConnection);
572+
.maxConsumersByConnection(this.consumersByConnection)
573+
.rpcTimeout(Duration.ofSeconds(this.rpcTimeout));
566574

567575
ChannelCustomizer channelCustomizer = channel -> {};
568576

0 commit comments

Comments
 (0)