diff options
| author | Keith Wall <kwall@apache.org> | 2014-03-07 17:24:48 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2014-03-07 17:24:48 +0000 |
| commit | 9bcbad89194862ef37832b9936ba8fc5fa58c47b (patch) | |
| tree | d25b12bf16782b329eeda01c6a62e81a91842254 /qpid/java/perftests/src/main/resources | |
| parent | 713dbcd70b5d2da2488c09676f18f1752683654e (diff) | |
| download | qpid-python-9bcbad89194862ef37832b9936ba8fc5fa58c47b.tar.gz | |
QPID-5612: JMS benchmarking tool [Part of the existing Java Broker Performance Test suite]
Simple tool that uses the existing performance test suite to give a message throughput statistics (msg/s) and (Kbytes/s)
for a use case involving a producer/consumer (on separate connections) with persistent messages on transactional
sessions. The test scales the number of connections through 1, 2, 5 and 10 and reports separate statistics for
each. The duration of the test and message size can be overridden from the command line via system properties
-Dqpid.disttest.duration and -Dqpid.disttest.messageSize respectively.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1575336 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/perftests/src/main/resources')
| -rw-r--r-- | qpid/java/perftests/src/main/resources/Benchmark.js | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/qpid/java/perftests/src/main/resources/Benchmark.js b/qpid/java/perftests/src/main/resources/Benchmark.js new file mode 100644 index 0000000000..bcdcc1edfb --- /dev/null +++ b/qpid/java/perftests/src/main/resources/Benchmark.js @@ -0,0 +1,77 @@ + +var jsonObject = { + _tests:[] +}; + +var duration = 30000; +var queueName = "direct://amq.direct//benchmark?durable='true'"; + +var numbersOfParticipants = [1, 2, 5, 10]; + +for(participantIndex=0; participantIndex < numbersOfParticipants.length; participantIndex++) +{ + var numberOfProducers = numbersOfParticipants[participantIndex]; + var numberOfConsumers = numbersOfParticipants[participantIndex]; + var test = { + "_name": "" + numberOfProducers + " producer(s) and " + numberOfConsumers + " consumer(s), each on separate connections, persistent messaging with transactional sessions", + "_queues":[ + { + "_name": queueName, + "_durable": true + } + ], + "_clients": + QPID.times(numberOfProducers, + { + "_name": "producingClient__PRODUCING_CLIENT_INDEX", + "_connections":[ + { + "_name": "connection1", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session1", + "_acknowledgeMode": 0, + "_producers": [ + { + "_name": "Producer__PRODUCING_CLIENT_INDEX", + "_destinationName": queueName, + "_maximumDuration": duration, + "_deliveryMode": 2, + "_messageSize": 1024 + } + ] + } + ] + } + ] + }, + "__PRODUCING_CLIENT_INDEX") + .concat(QPID.times(numberOfConsumers, + { + "_name": "consumingClient__CONSUMING_CLIENT_INDEX", + "_connections":[ + { + "_name": "connection1", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session1", + "_acknowledgeMode": 0, + "_consumers": [ + { + "_name": "Consumer__CONSUMING_CLIENT_INDEX", + "_destinationName": queueName, + "_maximumDuration": duration + } + ] + } + ] + } + ] + }, + "__CONSUMING_CLIENT_INDEX")) + }; + + jsonObject._tests= jsonObject._tests.concat(test); +} |
