@@ -45,33 +45,33 @@ public static void main(String[] args) {
4545 System .exit (0 );
4646 }
4747
48- String exchangeType = strArg (cmd , 't' , "direct" );
49- String exchangeName = strArg (cmd , 'e' , exchangeType );
50- String queueName = strArg (cmd , 'u' , "" );
51- String routingKey = strArg (cmd , 'k' , null );
52- boolean randomRoutingKey = cmd .hasOption ('K' );
53- int samplingInterval = intArg (cmd , 'i' , 1 );
54- float producerRateLimit = floatArg (cmd , 'r' , 0.0f );
55- float consumerRateLimit = floatArg (cmd , 'R' , 0.0f );
56- int producerCount = intArg (cmd , 'x' , 1 );
57- int consumerCount = intArg (cmd , 'y' , 1 );
58- int producerTxSize = intArg (cmd , 'm' , 0 );
59- int consumerTxSize = intArg (cmd , 'n' , 0 );
60- long confirm = intArg (cmd , 'c' , -1 );
61- boolean autoAck = cmd .hasOption ('a' );
62- int multiAckEvery = intArg (cmd , 'A' , 0 );
63- int channelPrefetch = intArg (cmd , 'Q' , 0 );
64- int consumerPrefetch = intArg (cmd , 'q' , 0 );
65- int minMsgSize = intArg (cmd , 's' , 0 );
66- int timeLimit = intArg (cmd , 'z' , 0 );
67- int producerMsgCount = intArg (cmd , 'C' , 0 );
68- int consumerMsgCount = intArg (cmd , 'D' , 0 );
69- List <?> flags = lstArg (cmd , 'f' );
70- int frameMax = intArg (cmd , 'M' , 0 );
71- int heartbeat = intArg (cmd , 'b' , 0 );
72- boolean predeclared = cmd .hasOption ('p' );
73-
74- String uri = strArg (cmd , 'h' , "amqp://localhost" );
48+ String exchangeType = strArg (cmd , 't' , "direct" );
49+ String exchangeName = strArg (cmd , 'e' , exchangeType );
50+ String queueName = strArg (cmd , 'u' , "" );
51+ String routingKey = strArg (cmd , 'k' , null );
52+ boolean randomRoutingKey = cmd .hasOption ('K' );
53+ int samplingInterval = intArg (cmd , 'i' , 1 );
54+ float producerRateLimit = floatArg (cmd , 'r' , 0.0f );
55+ float consumerRateLimit = floatArg (cmd , 'R' , 0.0f );
56+ int producerCount = intArg (cmd , 'x' , 1 );
57+ int consumerCount = intArg (cmd , 'y' , 1 );
58+ int producerTxSize = intArg (cmd , 'm' , 0 );
59+ int consumerTxSize = intArg (cmd , 'n' , 0 );
60+ long confirm = intArg (cmd , 'c' , -1 );
61+ boolean autoAck = cmd .hasOption ('a' );
62+ int multiAckEvery = intArg (cmd , 'A' , 0 );
63+ int channelPrefetch = intArg (cmd , 'Q' , 0 );
64+ int consumerPrefetch = intArg (cmd , 'q' , 0 );
65+ int minMsgSize = intArg (cmd , 's' , 0 );
66+ int timeLimit = intArg (cmd , 'z' , 0 );
67+ int producerMsgCount = intArg (cmd , 'C' , 0 );
68+ int consumerMsgCount = intArg (cmd , 'D' , 0 );
69+ List <?> flags = lstArg (cmd , 'f' );
70+ int frameMax = intArg (cmd , 'M' , 0 );
71+ int heartbeat = intArg (cmd , 'b' , 0 );
72+ boolean predeclared = cmd .hasOption ('p' );
73+
74+ String uri = strArg (cmd , 'h' , "amqp://localhost" );
7575
7676 //setup
7777 PrintlnStats stats = new PrintlnStats (1000L * samplingInterval ,
@@ -108,7 +108,7 @@ public static void main(String[] args) {
108108 p .setProducerTxSize ( producerTxSize );
109109 p .setQueueName ( queueName );
110110 p .setRoutingKey ( routingKey );
111- p .setRandomRoutingKey ( randomRoutingKey );
111+ p .setRandomRoutingKey ( randomRoutingKey );
112112 p .setProducerRateLimit (producerRateLimit );
113113 p .setTimeLimit ( timeLimit );
114114
@@ -134,35 +134,35 @@ private static void usage(Options options) {
134134
135135 private static Options getOptions () {
136136 Options options = new Options ();
137- options .addOption (new Option ("?" , "help" , false ,"show usage" ));
138- options .addOption (new Option ("h" , "uri" , true , "AMQP URI" ));
139- options .addOption (new Option ("t" , "type" , true , "exchange type" ));
140- options .addOption (new Option ("e" , "exchange" , true , "exchange name" ));
141- options .addOption (new Option ("u" , "queue" , true , "queue name" ));
142- options .addOption (new Option ("k" , "routingKey" , true , "routing key" ));
143- options .addOption (new Option ("K" , "randomRoutingKey" , false ,"use random routing key per message" ));
144- options .addOption (new Option ("i" , "interval" , true , "sampling interval" ));
145- options .addOption (new Option ("r" , "rate" , true , "producer rate limit" ));
146- options .addOption (new Option ("R" , "consumerRate" , true , "consumer rate limit" ));
147- options .addOption (new Option ("x" , "producers" , true , "producer count" ));
148- options .addOption (new Option ("y" , "consumers" , true , "consumer count" ));
149- options .addOption (new Option ("m" , "ptxsize" , true , "producer tx size" ));
150- options .addOption (new Option ("n" , "ctxsize" , true , "consumer tx size" ));
151- options .addOption (new Option ("c" , "confirm" , true , "max unconfirmed publishes" ));
152- options .addOption (new Option ("a" , "autoack" , false ,"auto ack" ));
153- options .addOption (new Option ("A" , "multiAckEvery" , true , "multi ack every" ));
154- options .addOption (new Option ("q" , "qos" , true , "consumer prefetch count" ));
155- options .addOption (new Option ("Q" , "globalQos" , true , "channel prefetch count" ));
156- options .addOption (new Option ("s" , "size" , true , "message size" ));
157- options .addOption (new Option ("z" , "time" , true , "time limit" ));
158- options .addOption (new Option ("C" , "pmessages" , true , "producer message count" ));
159- options .addOption (new Option ("D" , "cmessages" , true , "consumer message count" ));
160- Option flag = new Option ("f" , "flag" , true , "message flag" );
137+ options .addOption (new Option ("?" , "help" , false ,"show usage" ));
138+ options .addOption (new Option ("h" , "uri" , true , "AMQP URI" ));
139+ options .addOption (new Option ("t" , "type" , true , "exchange type" ));
140+ options .addOption (new Option ("e" , "exchange" , true , "exchange name" ));
141+ options .addOption (new Option ("u" , "queue" , true , "queue name" ));
142+ options .addOption (new Option ("k" , "routingKey" , true , "routing key" ));
143+ options .addOption (new Option ("K" , "randomRoutingKey" , false ,"use random routing key per message" ));
144+ options .addOption (new Option ("i" , "interval" , true , "sampling interval" ));
145+ options .addOption (new Option ("r" , "rate" , true , "producer rate limit" ));
146+ options .addOption (new Option ("R" , "consumerRate" , true , "consumer rate limit" ));
147+ options .addOption (new Option ("x" , "producers" , true , "producer count" ));
148+ options .addOption (new Option ("y" , "consumers" , true , "consumer count" ));
149+ options .addOption (new Option ("m" , "ptxsize" , true , "producer tx size" ));
150+ options .addOption (new Option ("n" , "ctxsize" , true , "consumer tx size" ));
151+ options .addOption (new Option ("c" , "confirm" , true , "max unconfirmed publishes" ));
152+ options .addOption (new Option ("a" , "autoack" , false ,"auto ack" ));
153+ options .addOption (new Option ("A" , "multiAckEvery" , true , "multi ack every" ));
154+ options .addOption (new Option ("q" , "qos" , true , "consumer prefetch count" ));
155+ options .addOption (new Option ("Q" , "globalQos" , true , "channel prefetch count" ));
156+ options .addOption (new Option ("s" , "size" , true , "message size" ));
157+ options .addOption (new Option ("z" , "time" , true , "time limit" ));
158+ options .addOption (new Option ("C" , "pmessages" , true , "producer message count" ));
159+ options .addOption (new Option ("D" , "cmessages" , true , "consumer message count" ));
160+ Option flag = new Option ("f" , "flag" , true , "message flag" );
161161 flag .setArgs (Option .UNLIMITED_VALUES );
162162 options .addOption (flag );
163- options .addOption (new Option ("M" , "framemax" , true , "frame max" ));
164- options .addOption (new Option ("b" , "heartbeat" , true , "heartbeat interval" ));
165- options .addOption (new Option ("p" , "predeclared" , false ,"allow use of predeclared objects" ));
163+ options .addOption (new Option ("M" , "framemax" , true , "frame max" ));
164+ options .addOption (new Option ("b" , "heartbeat" , true , "heartbeat interval" ));
165+ options .addOption (new Option ("p" , "predeclared" , false ,"allow use of predeclared objects" ));
166166 return options ;
167167 }
168168
0 commit comments