From eb58a828676bf1fad33c317f86a909f18cadacbc Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Thu, 5 Apr 2012 16:04:10 +0000 Subject: QPID-3936: initial checkin of new testing framework, initially to be used for performance testing but later to be expanded for use with other testing scenarios. Applied patch from Philip Harvey , Oleksandr Rudyy , Andrew MacBean , Keith Wall , and myself. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1309918 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/perftests/example/brokerconfig/log4j.xml | 125 ++++++++++++++++ qpid/java/perftests/example/brokerconfig/passwd | 23 +++ .../example/brokerconfig/virtualhosts.xml | 67 +++++++++ qpid/java/perftests/example/config-one-test.json | 55 +++++++ .../config-stress-testing-manyp-c1-with-psfc.json | 162 +++++++++++++++++++++ .../perftests/example/config-stress-testing.json | 84 +++++++++++ qpid/java/perftests/example/config-two-tests.json | 117 +++++++++++++++ .../java/perftests/example/log4j-client.properties | 29 ++++ qpid/java/perftests/example/log4j.properties | 35 +++++ .../perftests/example/perftests-jndi.properties | 26 ++++ qpid/java/perftests/example/run-client.sh | 1 + qpid/java/perftests/example/run.sh | 2 + 12 files changed, 726 insertions(+) create mode 100644 qpid/java/perftests/example/brokerconfig/log4j.xml create mode 100644 qpid/java/perftests/example/brokerconfig/passwd create mode 100644 qpid/java/perftests/example/brokerconfig/virtualhosts.xml create mode 100644 qpid/java/perftests/example/config-one-test.json create mode 100644 qpid/java/perftests/example/config-stress-testing-manyp-c1-with-psfc.json create mode 100644 qpid/java/perftests/example/config-stress-testing.json create mode 100644 qpid/java/perftests/example/config-two-tests.json create mode 100644 qpid/java/perftests/example/log4j-client.properties create mode 100644 qpid/java/perftests/example/log4j.properties create mode 100644 qpid/java/perftests/example/perftests-jndi.properties create mode 100755 qpid/java/perftests/example/run-client.sh create mode 100755 qpid/java/perftests/example/run.sh (limited to 'qpid/java/perftests/example') diff --git a/qpid/java/perftests/example/brokerconfig/log4j.xml b/qpid/java/perftests/example/brokerconfig/log4j.xml new file mode 100644 index 0000000000..7dbb1bc87d --- /dev/null +++ b/qpid/java/perftests/example/brokerconfig/log4j.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/qpid/java/perftests/example/brokerconfig/passwd b/qpid/java/perftests/example/brokerconfig/passwd new file mode 100644 index 0000000000..99f0f05c6a --- /dev/null +++ b/qpid/java/perftests/example/brokerconfig/passwd @@ -0,0 +1,23 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +guest:guest +client:guest +server:guest +admin:admin + diff --git a/qpid/java/perftests/example/brokerconfig/virtualhosts.xml b/qpid/java/perftests/example/brokerconfig/virtualhosts.xml new file mode 100644 index 0000000000..b0dbc89833 --- /dev/null +++ b/qpid/java/perftests/example/brokerconfig/virtualhosts.xml @@ -0,0 +1,67 @@ + + + + test + + + test + + + + + org.apache.qpid.server.store.berkeleydb.BDBMessageStore + /home/V510279/dev/qpid/qpid/java/build/work/bdbstore/test-store + + + + 30000 + 50 + + queue + + amq.direct + 4235264 + + 2117632 + + 600000 + + + + + ping + + amq.direct + 4235264 + + 2117632 + + 600000 + + + + + + + + + diff --git a/qpid/java/perftests/example/config-one-test.json b/qpid/java/perftests/example/config-one-test.json new file mode 100644 index 0000000000..8f4e577d49 --- /dev/null +++ b/qpid/java/perftests/example/config-one-test.json @@ -0,0 +1,55 @@ +{ + "_tests":[ + { + "_name": "One producer to one consumer"; + "_queues":[ + { + "_name": "direct://amq.direct//testQueue" + } + ]; + "_clients":[ + { + "_name": "producingClient", + "_connections":[ + { + "_name": "connection1", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session1", + "_producers": [ + { + "_name": "Producer1", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 5000 + } + ] + } + ] + } + ] + }, + { + "_name": "consumingClient", + "_connections":[ + { + "_name": "connection1", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session1", + "_consumers": [ + { + "_name": "Consumer1", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 5000 + } + ] + } + ] + } + ] + } + ] + }] +} diff --git a/qpid/java/perftests/example/config-stress-testing-manyp-c1-with-psfc.json b/qpid/java/perftests/example/config-stress-testing-manyp-c1-with-psfc.json new file mode 100644 index 0000000000..42c0f4a155 --- /dev/null +++ b/qpid/java/perftests/example/config-stress-testing-manyp-c1-with-psfc.json @@ -0,0 +1,162 @@ +{ + "_tests":[ + { + "_name": "Many producers to one consumer w/producer flow-control"; + "_queues":[ + { + "_name": "direct://amq.direct//testQueue", + "_attributes": + { + "comment": "does not work yet - configure in virtualhost.xml", + "x-qpid-capacity": 10485760, + "x-qpid-flow-resume-capacity": 8388608 + } + } + ]; + "_clients":[ + { + "_name": "producingClient1", + "_connections":[ + { + "_name": "connection1", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session1", + "_acknowledgeMode": 1, + "_producers": [ + { + "_name": "Producer1", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 1000000, + "_deliveryMode": 1, + "_messageSize": 10000 + } + ] + } + ] + } + ] + }, + { + "_name": "producingClient2", + "_connections":[ + { + "_name": "connection2", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session2", + "_acknowledgeMode": 1, + "_producers": [ + { + "_name": "Producer2", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 1000000, + "_deliveryMode": 1, + "_messageSize": 10000 + } + ] + } + ] + } + ] + }, + { + "_name": "producingClient3", + "_connections":[ + { + "_name": "connection3", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session3", + "_acknowledgeMode": 1, + "_producers": [ + { + "_name": "Producer3", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 1000000, + "_deliveryMode": 1, + "_messageSize": 10000 + } + ] + } + ] + } + ] + }, + { + "_name": "producingClient4", + "_connections":[ + { + "_name": "connection4", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session4", + "_acknowledgeMode": 1, + "_producers": [ + { + "_name": "Producer4", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 1000000, + "_deliveryMode": 1, + "_messageSize": 10000 + } + ] + } + ] + } + ] + }, + { + "_name": "producingClient5", + "_connections":[ + { + "_name": "connection5", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session5", + "_acknowledgeMode": "1", + "_producers": [ + { + "_name": "Producer5", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 1000000, + "_deliveryMode": 1, + "_messageSize": 10000 + } + ] + } + ] + } + ] + }, + { + "_name": "consumingClient", + "_connections":[ + { + "_name": "connection5", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session5", + "_acknowledgeMode": 1, + "_consumers": [ + { + "_name": "Consumer1", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 5000000 + } + ] + } + ] + } + ] + } + ] + } + ] +} diff --git a/qpid/java/perftests/example/config-stress-testing.json b/qpid/java/perftests/example/config-stress-testing.json new file mode 100644 index 0000000000..f6029b848d --- /dev/null +++ b/qpid/java/perftests/example/config-stress-testing.json @@ -0,0 +1,84 @@ +{ + "_tests":[ + { + "_name": "One producer to one consumer"; + "_iterations":[ + { + "_messageSize": 10000 + }, + { + "_messageSize": 10000 + }, + { + "_messageSize": 10000 + }, + { + "_messageSize": 10000 + }, + { + "_messageSize": 10000 + }, + { + "_messageSize": 10000 + }, + { + "_messageSize": 10000 + }, + { + "_messageSize": 10000 + } + ], + "_queues":[ + { + "_name": "direct://amq.direct//testQueue" + } + ], + "_clients":[ + { + "_name": "producingClient", + "_connections":[ + { + "_name": "connection1", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session1", + "_acknowledgeMode": 1, + "_producers": [ + { + "_name": "Producer1", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 1000000, + "_deliveryMode": 1 + } + ] + } + ] + } + ] + }, + { + "_name": "consumingClient", + "_connections":[ + { + "_name": "connection1", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session1", + "_acknowledgeMode": 1, + "_consumers": [ + { + "_name": "Consumer1", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 1000000 + } + ] + } + ] + } + ] + } + ] + }] +} diff --git a/qpid/java/perftests/example/config-two-tests.json b/qpid/java/perftests/example/config-two-tests.json new file mode 100644 index 0000000000..79d305b100 --- /dev/null +++ b/qpid/java/perftests/example/config-two-tests.json @@ -0,0 +1,117 @@ +{ + "_tests":[ + { + "_name": "One producer to one consumer"; + "_queues":[ + { + "_name": "direct://amq.direct//testQueue" + } + ]; + "_clients":[ + { + "_name": "producingClient", + "_connections":[ + { + "_name": "connection1", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session1", + "_producers": [ + { + "_name": "Producer1", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 5000 + } + ] + } + ] + } + ] + }, + { + "_name": "consumingClient", + "_connections":[ + { + "_name": "connection1", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session1", + "_consumers": [ + { + "_name": "Consumer1", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 5000 + } + ] + } + ] + } + ] + } + ] + }, + { + "_name": "One producer to two consumers"; + "_queues":[ + { + "_name": "direct://amq.direct//testQueue" + } + ]; + "_clients":[ + { + "_name": "producingClient", + "_connections":[ + { + "_name": "connection1", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session1", + "_producers": [ + { + "_name": "Producer", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 5000 + } + ] + } + ] + } + ] + }, + { + "_name": "consumingClient", + "_connections":[ + { + "_name": "connection1", + "_factory": "connectionfactory", + "_sessions": [ + { + "_sessionName": "session1", + "_consumers": [ + { + "_name": "Consumer1", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 2500 + } + ] + }, + { + "_sessionName": "session2", + "_consumers": [ + { + "_name": "Consumer2", + "_destinationName": "direct://amq.direct//testQueue", + "_numberOfMessages": 2500 + } + ] + } + ] + } + ] + } + ] + }] +} diff --git a/qpid/java/perftests/example/log4j-client.properties b/qpid/java/perftests/example/log4j-client.properties new file mode 100644 index 0000000000..b724cbf5f2 --- /dev/null +++ b/qpid/java/perftests/example/log4j-client.properties @@ -0,0 +1,29 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +log4j.rootLogger=ERROR,console + +log4j.logger.org.apache.qpid=WARN +log4j.logger.org.apache.qpid.disttest=INFO + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.Threshold=all +log4j.appender.console.layout=org.apache.log4j.PatternLayout + +log4j.appender.console.layout.ConversionPattern=%d %p [%c{1}] %m%n + diff --git a/qpid/java/perftests/example/log4j.properties b/qpid/java/perftests/example/log4j.properties new file mode 100644 index 0000000000..8af70ebef2 --- /dev/null +++ b/qpid/java/perftests/example/log4j.properties @@ -0,0 +1,35 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +log4j.rootLogger=ERROR,console,fileApp + +log4j.logger.org.apache.qpid=WARN +log4j.logger.org.apache.qpid.disttest=INFO + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.Threshold=all +log4j.appender.console.layout=org.apache.log4j.PatternLayout + +log4j.appender.console.layout.ConversionPattern=%d %p [%c{1}] %m%n + +log4j.appender.fileApp=org.apache.log4j.FileAppender +log4j.appender.fileApp.file=perftests.log +log4j.appender.fileApp.Threshold=info +log4j.appender.fileApp.append=false +log4j.appender.fileApp.layout=org.apache.log4j.PatternLayout +log4j.appender.fileApp.layout.ConversionPattern=%d %p [%c{1}] %m%n \ No newline at end of file diff --git a/qpid/java/perftests/example/perftests-jndi.properties b/qpid/java/perftests/example/perftests-jndi.properties new file mode 100644 index 0000000000..8ad0decaad --- /dev/null +++ b/qpid/java/perftests/example/perftests-jndi.properties @@ -0,0 +1,26 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# this file is used for running system tests of the performance test framework, +# (i.e. not for running the performance tests themselves!) + +java.naming.factory.initial = org.apache.qpid.jndi.PropertiesFileInitialContextFactory + +# use QpidBrokerTestCase's default port +connectionfactory.connectionfactory = amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672' + +destination.controllerqueue = direct://amq.direct//controllerqueue diff --git a/qpid/java/perftests/example/run-client.sh b/qpid/java/perftests/example/run-client.sh new file mode 100755 index 0000000000..7d2d33bb83 --- /dev/null +++ b/qpid/java/perftests/example/run-client.sh @@ -0,0 +1 @@ +java -cp ".:${QPID_HOME}/lib/*" -Dlog4j.configuration=log4j-client.properties -Dqpid.dest_syntax=BURL org.apache.qpid.disttest.ClientRunner jndi-config=perftests-jndi.properties diff --git a/qpid/java/perftests/example/run.sh b/qpid/java/perftests/example/run.sh new file mode 100755 index 0000000000..0290e0a3b4 --- /dev/null +++ b/qpid/java/perftests/example/run.sh @@ -0,0 +1,2 @@ +java -cp ".:${QPID_HOME}/lib/*" -Dqpid.dest_syntax=BURL org.apache.qpid.disttest.ControllerRunner jndi-config=perftests-jndi.properties test-config=$1 distributed=true + -- cgit v1.2.1