94
94
name = "stream-perf-test" ,
95
95
mixinStandardHelpOptions = false ,
96
96
showDefaultValues = true ,
97
+ separator = " " ,
97
98
description = "Tests the performance of stream queues in RabbitMQ." )
98
99
public class StreamPerfTest implements Callable <Integer > {
99
100
@@ -169,8 +170,14 @@ public class StreamPerfTest implements Callable<Integer> {
169
170
@ CommandLine .Option (
170
171
names = {"--delete-streams" , "-ds" },
171
172
description = "whether to delete stream(s) after the run or not" ,
173
+ arity = "0..1" ,
174
+ fallbackValue = "true" ,
172
175
defaultValue = "false" )
173
- private boolean deleteStreams ;
176
+ void setDeleteStreams (String input ) throws Exception {
177
+ this .deleteStreams = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
178
+ }
179
+
180
+ boolean deleteStreams ;
174
181
175
182
@ CommandLine .Option (
176
183
names = {"--offset" , "-o" },
@@ -265,14 +272,26 @@ public class StreamPerfTest implements Callable<Integer> {
265
272
@ CommandLine .Option (
266
273
names = {"--version" , "-v" },
267
274
description = "show version information" ,
275
+ arity = "0..1" ,
276
+ fallbackValue = "true" ,
268
277
defaultValue = "false" )
269
- private boolean version ;
278
+ void setVersion (String input ) throws Exception {
279
+ this .version = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
280
+ }
281
+
282
+ boolean version ;
270
283
271
284
@ CommandLine .Option (
272
285
names = {"--summary-file" , "-sf" },
273
286
description = "generate a summary file with metrics" ,
287
+ arity = "0..1" ,
288
+ fallbackValue = "true" ,
274
289
defaultValue = "false" )
275
- private boolean summaryFile ;
290
+ void setSummaryFile (String input ) throws Exception {
291
+ this .summaryFile = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
292
+ }
293
+
294
+ boolean summaryFile ;
276
295
277
296
@ CommandLine .Option (
278
297
names = {"--producers-by-connection" , "-pbc" },
@@ -309,8 +328,14 @@ public class StreamPerfTest implements Callable<Integer> {
309
328
@ CommandLine .Option (
310
329
names = {"--load-balancer" , "-lb" },
311
330
description = "assume URIs point to a load balancer" ,
331
+ arity = "0..1" ,
332
+ fallbackValue = "true" ,
312
333
defaultValue = "false" )
313
- private boolean loadBalancer ;
334
+ void setLoadBalancer (String input ) throws Exception {
335
+ this .loadBalancer = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
336
+ }
337
+
338
+ boolean loadBalancer ;
314
339
315
340
@ CommandLine .Option (
316
341
names = {"--consumer-names" , "-cn" },
@@ -324,14 +349,26 @@ public class StreamPerfTest implements Callable<Integer> {
324
349
@ CommandLine .Option (
325
350
names = {"--metrics-byte-rates" , "-mbr" },
326
351
description = "include written and read byte rates in metrics" ,
352
+ arity = "0..1" ,
353
+ fallbackValue = "true" ,
327
354
defaultValue = "false" )
328
- private boolean includeByteRates ;
355
+ void setIncludeByteRates (String input ) throws Exception {
356
+ this .includeByteRates = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
357
+ }
358
+
359
+ boolean includeByteRates ;
329
360
330
361
@ CommandLine .Option (
331
362
names = {"--memory-report" , "-mr" },
332
363
description = "report information on memory settings and usage" ,
364
+ arity = "0..1" ,
365
+ fallbackValue = "true" ,
333
366
defaultValue = "false" )
334
- private boolean memoryReport ;
367
+ void setMemoryReport (String input ) throws Exception {
368
+ this .memoryReport = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
369
+ }
370
+
371
+ boolean memoryReport ;
335
372
336
373
@ CommandLine .Option (
337
374
names = {"--server-name-indication" , "-sni" },
@@ -349,8 +386,14 @@ public class StreamPerfTest implements Callable<Integer> {
349
386
@ CommandLine .Option (
350
387
names = {"--environment-variables" , "-env" },
351
388
description = "show usage with environment variables" ,
389
+ arity = "0..1" ,
390
+ fallbackValue = "true" ,
352
391
defaultValue = "false" )
353
- private boolean environmentVariables ;
392
+ void setEnvironmentVariables (String input ) throws Exception {
393
+ this .environmentVariables = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
394
+ }
395
+
396
+ boolean environmentVariables ;
354
397
355
398
@ CommandLine .Option (
356
399
names = {"--rpc-timeout" , "-rt" },
@@ -362,14 +405,26 @@ public class StreamPerfTest implements Callable<Integer> {
362
405
@ CommandLine .Option (
363
406
names = {"--confirm-latency" , "-cl" },
364
407
description = "evaluate confirm latency" ,
408
+ arity = "0..1" ,
409
+ fallbackValue = "true" ,
365
410
defaultValue = "false" )
366
- private boolean confirmLatency ;
411
+ void setConfirmLatency (String input ) throws Exception {
412
+ this .confirmLatency = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
413
+ }
414
+
415
+ boolean confirmLatency ;
367
416
368
417
@ CommandLine .Option (
369
418
names = {"--super-streams" , "-sst" },
370
419
description = "use super streams (RabbitMQ 3.13+)" ,
420
+ arity = "0..1" ,
421
+ fallbackValue = "true" ,
371
422
defaultValue = "false" )
372
- private boolean superStreams ;
423
+ void setSuperStreams (String input ) throws Exception {
424
+ this .superStreams = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
425
+ }
426
+
427
+ boolean superStreams ;
373
428
374
429
@ CommandLine .Option (
375
430
names = {"--super-stream-partitions" , "-ssp" },
@@ -381,8 +436,14 @@ public class StreamPerfTest implements Callable<Integer> {
381
436
@ CommandLine .Option (
382
437
names = {"--single-active-consumer" , "-sac" },
383
438
description = "use single active consumer" ,
439
+ arity = "0..1" ,
440
+ fallbackValue = "true" ,
384
441
defaultValue = "false" )
385
- private boolean singleActiveConsumer ;
442
+ void setSingleActiveConsumer (String input ) throws Exception {
443
+ this .singleActiveConsumer = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
444
+ }
445
+
446
+ boolean singleActiveConsumer ;
386
447
387
448
@ CommandLine .Option (
388
449
names = {"--amqp-uri" , "-au" },
@@ -406,8 +467,14 @@ public class StreamPerfTest implements Callable<Integer> {
406
467
@ CommandLine .Option (
407
468
names = {"--metrics-command-line-arguments" , "-mcla" },
408
469
description = "add fixed metrics with command line arguments label" ,
470
+ arity = "0..1" ,
471
+ fallbackValue = "true" ,
409
472
defaultValue = "false" )
410
- private boolean metricsCommandLineArguments ;
473
+ void setMetricsCommandLineArguments (String input ) throws Exception {
474
+ this .metricsCommandLineArguments = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
475
+ }
476
+
477
+ boolean metricsCommandLineArguments ;
411
478
412
479
@ CommandLine .Option (
413
480
names = {"--requested-max-frame-size" , "-rmfs" },
@@ -419,8 +486,14 @@ public class StreamPerfTest implements Callable<Integer> {
419
486
@ CommandLine .Option (
420
487
names = {"--native-epoll" , "-ne" },
421
488
description = "use Netty's native epoll transport (Linux x86-64 only)" ,
489
+ arity = "0..1" ,
490
+ fallbackValue = "true" ,
422
491
defaultValue = "false" )
423
- private boolean nativeEpoll ;
492
+ void setNativeEpoll (String input ) throws Exception {
493
+ this .nativeEpoll = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
494
+ }
495
+
496
+ boolean nativeEpoll ;
424
497
425
498
@ ArgGroup (exclusive = false , multiplicity = "0..1" )
426
499
InstanceSyncOptions instanceSyncOptions ;
@@ -447,26 +520,50 @@ public class StreamPerfTest implements Callable<Integer> {
447
520
@ CommandLine .Option (
448
521
names = {"--force-replica-for-consumers" , "-frfc" },
449
522
description = "force the connection to a replica for consumers" ,
523
+ arity = "0..1" ,
524
+ fallbackValue = "true" ,
450
525
defaultValue = "false" )
451
- private boolean forceReplicaForConsumers ;
526
+ void setForceReplicaForConsumers (String input ) throws Exception {
527
+ this .forceReplicaForConsumers = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
528
+ }
529
+
530
+ boolean forceReplicaForConsumers ;
452
531
453
532
@ CommandLine .Option (
454
533
names = {"--no-dev-mode" , "-ndm" },
455
534
description = "do not use development mode (useful for local cluster)" ,
535
+ arity = "0..1" ,
536
+ fallbackValue = "true" ,
456
537
defaultValue = "false" )
457
- private boolean noDevMode ;
538
+ void setNoDevMode (String input ) throws Exception {
539
+ this .noDevMode = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
540
+ }
541
+
542
+ boolean noDevMode ;
458
543
459
544
@ CommandLine .Option (
460
545
names = {"--dynamic-batch-size" , "-dbs" },
461
546
description = "use dynamic batch size for publishing" ,
547
+ arity = "0..1" ,
548
+ fallbackValue = "true" ,
462
549
defaultValue = "true" )
463
- private boolean dynamicBatch ;
550
+ void setDynamicBatch (String input ) throws Exception {
551
+ this .dynamicBatch = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
552
+ }
553
+
554
+ boolean dynamicBatch ;
464
555
465
556
@ CommandLine .Option (
466
557
names = {"--batch-size-metric" , "-bsm" },
467
558
description = "display batch size" ,
559
+ arity = "0..1" ,
560
+ fallbackValue = "true" ,
468
561
defaultValue = "false" )
469
- private boolean includeBatchSizeMetric ;
562
+ void setIncludeByteSizeMetric (String input ) throws Exception {
563
+ this .includeBatchSizeMetric = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
564
+ }
565
+
566
+ boolean includeBatchSizeMetric ;
470
567
471
568
static class InstanceSyncOptions {
472
569
@@ -553,9 +650,14 @@ static class InstanceSyncOptions {
553
650
@ CommandLine .Option (
554
651
names = {"--tcp-no-delay" , "-tnd" },
555
652
description = "TCP NODELAY" ,
556
- arity = "1" ,
653
+ arity = "0..1" ,
654
+ fallbackValue = "true" ,
557
655
defaultValue = "true" )
558
- private boolean tcpNoDelay ;
656
+ void setTcpNoDelay (String input ) throws Exception {
657
+ this .tcpNoDelay = Converters .BOOLEAN_TYPE_CONVERTER .convert (input );
658
+ }
659
+
660
+ boolean tcpNoDelay ;
559
661
560
662
@ CommandLine .Option (
561
663
names = {"--consumer-latency" , "-L" },
0 commit comments