@@ -22,99 +22,112 @@ limitations under the License.
22
22
23
23
<html xmlns =" http://www.w3.org/1999/xhtml" xmlns : doc =" http://www.rabbitmq.com/namespaces/ad-hoc/doc" >
24
24
<head >
25
- <title >Java Client Tools</title >
25
+ <title >Java Tools</title >
26
26
</head >
27
27
<body >
28
28
<p class =" intro" >
29
- The Java client distribution ships with some utility programs written
30
- using the Java client. This page documents how to use them.
31
- </p >
32
- <p >
33
- These utility programs are contained
34
- within <code >rabbitmq-client-tests.jar</code >. This jar file also
35
- contains several small example programs for exercising the functionality
36
- of the RabbitMQ server. The source code for these examples is in
37
- the <code >test/src</code > folder in the source distribution. These are
38
- intended to be fairly self-explanatory and are not documented here.
39
- </p >
40
- <p >
41
- The script <code >runjava.<i >{</i >sh<i >,</i >bat<i >}</i ></code > runs Java with
42
- the class path correctly configured for the examples, e.g.
43
- <code >runjava.sh com.rabbitmq.examples.TestMain</code > runs
44
- the <code >TestMain</code > functional tests.
29
+ This page documents some Java-based utility programs (performance, tracing).
45
30
</p >
46
31
47
- <doc : section name =" perftest " >
48
- <doc : heading >PerfTest </doc : heading >
32
+ <doc : section name =" performance " >
33
+ <doc : heading >Performance tool </doc : heading >
49
34
<p >
50
- <code >PerfTest</code > (formerly known
51
- as <code >MulticastMain</code >) is a performance testing tool. It
52
- starts up zero or more producers and consumers and reports the
53
- rate at which messages are sent and received, along with the
54
- latency (i.e. time taken for messages to pass through the
55
- broker).
35
+ The performance tool distribution contains Java programs
36
+ to run various performance scenarios and some HTML utility
37
+ to display graphs of the performance runs.
56
38
</p >
57
39
58
40
<p >
59
- <code >PerfTest</code > supports many command line
60
- flags. Invoke it with <code >--help</code > to see them:
41
+ The distribution contains a script (<code >runjava</code > or <code >runjava.bat</code >)
42
+ to run Java with the class path correctly configured, e.g.
43
+ <code >runjava com.rabbitmq.perf.PerfTest</code > runs
44
+ the <code >PerfTest</code > Java class.
61
45
</p >
62
- <pre >runjava.sh com.rabbitmq.examples.PerfTest --help</pre >
63
- <p >Some examples:</p >
64
- <dl >
65
- <dt ><pre >runjava.sh com.rabbitmq.examples.PerfTest -a</pre ></dt >
66
- <dd >
67
- Send transient messages without acknowledgement, 1
68
- producer and 1 consumer.
69
- </dd >
70
- <dt ><pre >runjava.sh com.rabbitmq.examples.PerfTest -c 1000</pre ></dt >
71
- <dd >
72
- Similar, but with acknowledgments and confirms.
73
- </dd >
74
- <dt ><pre >runjava.sh com.rabbitmq.examples.PerfTest -c 1000 -f persistent</pre ></dt >
75
- <dd >
76
- ...with acknowledgments, confirms and persistence.
77
- </dd >
78
- <dt ><pre >runjava.sh com.rabbitmq.examples.PerfTest -y0 -p -u my-queue -s 1000 -C 1000000</pre ></dt >
79
- <dd >
80
- Fill a pre-declared queue with 1M transient messages of 1kB each
81
- </dd >
82
- <dt ><pre >runjava.sh com.rabbitmq.examples.PerfTest -x0 -y10 -p -u another-queue</pre ></dt >
83
- <dd >
84
- Start 10 consumers from a predeclared queue, and no producers.
85
- </dd >
86
- </dl >
87
46
88
- <p >
89
- If a queue name is defined (<code >-u "queue-name"</code >), PerfTest will create a queue with this name
90
- and all consumers will consume from this queue. The queue will be bound to the direct exchange with its name
91
- as the routing key. The routing key will be used by producers to send messages.
92
- This will cause messages from all producers to be sent to this single queue and all consumers to receive
93
- messages from this single queue.
94
- </p >
95
- <p >
96
- If the queue name is not defined, PerfTest will create a random UUID routing key with which producers will publish messages.
97
- Each consumer will create its own anonymous queue and bind it to the direct exchange with this routing key.
98
- This will cause each message from all producers to be replicated to multiple queues
99
- (number of queues equals number of consumers), while each consumer will be receiving messages from only one queue.
100
- When using PerfTest without a queue name it makes sense to set <code >ratesMode</code > for consumer to
101
- <code >producerRatesMode * producersCount</code >
102
- For example:
103
- <pre >runjava.sh com.rabbitmq.examples.PerfTest -x100 -y100 -r2 -R200</pre >
104
- </p >
47
+ <doc : subsection name =" perf-test" >
48
+ <doc : heading >PerfTest</doc : heading >
49
+ <p >
50
+ <code >PerfTest</code > is a performance testing tool. It
51
+ starts up zero or more producers and consumers and reports the
52
+ rate at which messages are sent and received, along with the
53
+ latency (i.e. time taken for messages to pass through the
54
+ broker).
55
+ </p >
56
+
57
+ <p >
58
+ <code >PerfTest</code > supports many command line
59
+ flags. Invoke it with <code >--help</code > to see them:
60
+ </p >
61
+ <pre >runjava com.rabbitmq.perf.PerfTest --help</pre >
62
+ <p >Some examples:</p >
63
+ <dl >
64
+ <dt ><pre >runjava com.rabbitmq.perf.PerfTest -a</pre ></dt >
65
+ <dd >
66
+ Send transient messages without acknowledgement, 1
67
+ producer and 1 consumer.
68
+ </dd >
69
+ <dt ><pre >runjava com.rabbitmq.perf.PerfTest -c 1000</pre ></dt >
70
+ <dd >
71
+ Similar, but with acknowledgments and confirms.
72
+ </dd >
73
+ <dt ><pre >runjava com.rabbitmq.perf.PerfTest -c 1000 -f persistent</pre ></dt >
74
+ <dd >
75
+ ...with acknowledgments, confirms and persistence.
76
+ </dd >
77
+ <dt ><pre >runjava com.rabbitmq.perf.PerfTest -y0 -p -u my-queue -s 1000 -C 1000000</pre ></dt >
78
+ <dd >
79
+ Fill a pre-declared queue with 1M transient messages of 1kB each
80
+ </dd >
81
+ <dt ><pre >runjava com.rabbitmq.perf.PerfTest -x0 -y10 -p -u another-queue</pre ></dt >
82
+ <dd >
83
+ Start 10 consumers from a predeclared queue, and no producers.
84
+ </dd >
85
+ </dl >
86
+
87
+ <p >
88
+ If a queue name is defined (<code >-u "queue-name"</code >), PerfTest will create a queue with this name
89
+ and all consumers will consume from this queue. The queue will be bound to the direct exchange with its name
90
+ as the routing key. The routing key will be used by producers to send messages.
91
+ This will cause messages from all producers to be sent to this single queue and all consumers to receive
92
+ messages from this single queue.
93
+ </p >
94
+ <p >
95
+ If the queue name is not defined, PerfTest will create a random UUID routing key with which producers will publish messages.
96
+ Each consumer will create its own anonymous queue and bind it to the direct exchange with this routing key.
97
+ This will cause each message from all producers to be replicated to multiple queues
98
+ (number of queues equals number of consumers), while each consumer will be receiving messages from only one queue.
99
+ When using PerfTest without a queue name it makes sense to set <code >ratesMode</code > for consumer to
100
+ <code >producerRatesMode * producersCount</code >
101
+ For example:
102
+ <pre >runjava com.rabbitmq.perf.PerfTest -x100 -y100 -r2 -R200</pre >
103
+ </p >
104
+
105
+ </doc : subsection >
106
+
107
+
108
+ <doc : subsection name =" perf-html" >
109
+ <doc : heading >HTML Performance Tools</doc : heading >
110
+ <p >
111
+ The <code >HTML Performance Tools</code > are a set of tools
112
+ that can help you run automated benchmarks by wrapping around the
113
+ <code >PerfTest</code > benchmarking framework. You can provide
114
+ benchmark specs, and the tool will take care of running the benchmark,
115
+ collecting results and displaying them in an HTML page. Learn more
116
+ <a href =" https://github.com/rabbitmq/rabbitmq-perf-test/blob/master/HTML_PERFORMANCE_TOOLS.md" >here</a >
117
+ </p >
118
+ </doc : subsection >
119
+
120
+ <doc : subsection name =" perf-download" >
121
+ <doc : heading >Download and source code</doc : heading >
122
+ <p >
123
+ <a href =" https://github.com/rabbitmq/rabbitmq-perf-test/releases" >Releases</a >
124
+ </p >
125
+ <p >
126
+ <a href =" https://github.com/rabbitmq/rabbitmq-perf-test" >Source code</a >
127
+ </p >
128
+ </doc : subsection >
105
129
106
- </doc : section >
107
130
108
- <doc : section name =" html-performance-tools" >
109
- <doc : heading >HTML Performance Tools</doc : heading >
110
- <p >
111
- The <code >HTML Performance Tools</code > are a set of tools
112
- that can help you run automated benchmarks by wrapping around the
113
- <code >PerfTest</code > benchmarking framework. You can provide
114
- benchmark specs, and the tool will take care of running the benchmark,
115
- collecting results and displaying them in an HTML page. Learn more
116
- <a href =" https://github.com/rabbitmq/rabbitmq-perf-html" >here</a >
117
- </p >
118
131
</doc : section >
119
132
120
133
<doc : section name =" tracer" >
0 commit comments