diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2010-03-04 00:22:39 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2010-03-04 00:22:39 +0000 |
| commit | b3197f88032c1fe9dc92db4bcb97b9d014f02cbc (patch) | |
| tree | 8f05f303344ceffa3ff98ed6cd95086bd27e27cd /java | |
| parent | 32ec312af45f2782bd71540d857d7a0dd149b163 (diff) | |
| download | qpid-python-b3197f88032c1fe9dc92db4bcb97b9d014f02cbc.tar.gz | |
Moved the scripts and config files to the tools module as the Perf Producer and Consumer are now housed under the tools module.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@918790 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/testkit/README | 151 | ||||
| -rw-r--r-- | java/testkit/etc/jndi.properties | 35 | ||||
| -rw-r--r-- | java/testkit/etc/test.log4j | 28 | ||||
| -rw-r--r-- | java/tools/bin/run_pub.sh | 2 | ||||
| -rw-r--r-- | java/tools/bin/run_sub.sh | 2 |
5 files changed, 4 insertions, 214 deletions
diff --git a/java/testkit/README b/java/testkit/README index fdde734027..df7996f471 100644 --- a/java/testkit/README +++ b/java/testkit/README @@ -1,153 +1,6 @@ Introduction ============ -The Test kit for the java client consists of 2 components. - -1) A Simple Perf Test that can be used to, - a) Run a predefined perf report consisting of 8 use cases (see below) - b) Run a producer and a consumer with a number of different options - -2) Soak tests that can be run for longer durations (hours or days). - -I am planning to add some stress tests to this module as well. -Please note this is not a replacement for the existing perf/systests etc. -But rather a small test kit thats focused on providing a packaged set of tests that can be quickly deployed on an environment to do quick smoke testing or easily setup a soak test. - -Table of Contents -================= -1. Perf Kit -2. Soak Kit -3. Perf Test use cases -4. Soak Test use cases -5. Running the sample perf test report -6. Running the sample soak test report - -1.0 Perf Kit ------------- -1.1 The perf kit can be packaged as an RPM or a tar file and deploy on a target environment and run the perf report. -Or else a perf report can be automated to run every day or so an record numbers to catch perf regressions. - -1.2 It calculates the following results in msg/sec. - - System throuhgput : no_of_msgs / (time_last_msg_rcvd - time_first_msg_send) - - Producer rate : no_of_msgs / (time_after_sending - time_before_sending) - - Producer rate : no_of_msgs / (time_last_msg_rcvd - time_first_msg_rcvd) - - Latency : time_msg_rcvd - time_msg_sent - -The test will print min, max and avg latency. - -1.3 The test assume that both producer and consumer are run on the same machine or different machines that are time synced. - -1.4 You can also use run_sub.sh and run_pub.sh to run different use cases with several options. - Please look at TestParams.java for all the configurable options. - -1.5 You can also use the test kit to benchmark against any vendor. - - -2.0 Soak tests --------------- -2.0 This includes a set of soak tests that can be run for a longer duration. - -2.1 A typical test will send x-1 messages and the xth message will contain an "End" marker. - The producer will print the timestamp as soon as it sends the xth message. - The consumer will reply with an empty message to the replyTo destination given in the xth message. - The consumer prints the throuhgput for the iteration and the latency for the xth message. - A typical value for x is 100k - -2.2 The feedback loop prevents the producer from overrunning the consumer. - And the printout for every xth message will let you know how many iterations been completed at any given time. - (Ex a simple cat log | wc -l will give you the how many iterations have been completed so far). - -2.2 The following results can be calculated for these tests. - - Memory, CPU for each producer/consumer - look at testkit/bin/run_soak_client.sh for an example - - You can find the Avg, Min & Max for throughput, latency, CPU and memory for the entire test run. - (look at testkit/bin/soak_report.sh) for an example). - - You could also graph throughput, latency, CPU and memory using the comma separated log files. - -2.2 If you use different machines for producer and consumer the machines have to be time synced to have meaningful latency samples. - -3.0 Perf Test report use cases -------------------------------- -3.1 Please check testkit/bin/perf_report.sh for more details - -3.2 A typical test run will send 1000 msgs during warmup and 200k msgs for result calculation. - -Test 1 Trans Queue - -Test 2 Dura Queue - -Test 3 Dura Queue Sync - -Test 4 Topic - -Test 5 Durable Topic - -Test 6 Fanout - -Test 7 Small TX (about 2 msgs per tx) - -Test 8 Large TX (about 1000 msgs per tx) - - -4.0 Soak tests use cases -------------------------- -4.1 Following are the current tests available in the test kit. - -4.2 Please refer to the source to see the javadoc and options - - -1. SimpleProducer/Consumer sends X messages at a time and will wait for confirmation from producer before proceeding with the next iteration. A no of options can be configured. - -2. MultiThreadedProducer/Consumer does the same thing as above but runs each session in a separate thread. - It can also send messages transactionally. Again a no of options can be configured. - -3. ResourceLeakTest will setup consumer/producers sends x messages and then teard down everything and continue again. - - -5.0 Running the sample perf test report ---------------------------------------- -The testkit/bin contains perf_report.sh. -It runs the above 8 use cases against a broker and print the results in a tabular format. - -For example -================================================================================================ -|Test |System throuput|Producer rate|Consumer Rate|Avg Latency|Min Latency|Max Latency| ------------------------------------------------------------------------------------------------- -|Trans_Queue | xxxxx.xx| xxxxx.xx| xxxxx.xx| xx.xx| x| xx| - - -5.1 running perf_report.sh - -5.1.1 set JAVA_HOME to point to Java 1.5 and above -5.1.2 set QPID_TEST_HOME to point to the testkit dir -5.1.3 set VENDOR_LIB to point to the Qpid (or other JMS providers) jar files. -5.1.4 start a broker -5.1.5 update the testkit/etc/jndi.properties to point to the correct broker -5.1.6 execute perf_report.sh - - -6.0 Running the sample soak test report ---------------------------------------- -The testkit/bin contains soak_report.sh -It runs MultiThreadedProducer/Consumer for the duration specified and prints a report for the following stats. -Avg, Min and Max for System Throughput, letency, CPU and memory. - -6.1 running soak_report.sh - -5.1.1 set JAVA_HOME to point to Java 1.5 and above -5.1.2 set QPID_TEST_HOME to point to the testkit dir -5.1.3 set JAR_PATH to point to the Qpid jars -5.1.4 start a broker -5.1.5 execute soak_report.sh with correct params. - Ex sh soak_report.sh 1 36000 will run for 10 hours colllecting CPU, memory every second. - -5.1.6 Please note the total duration for the test is log_freq * log_iterations - So if you want to run the test for 10 hours and collect 10 second samples then do the following - sh soak_report.sh 10 3600 +The Test kit for the JMS client is based on a multi-broker python framework. +So far it could only be used with the c++ broker. diff --git a/java/testkit/etc/jndi.properties b/java/testkit/etc/jndi.properties deleted file mode 100644 index 7a8180477b..0000000000 --- a/java/testkit/etc/jndi.properties +++ /dev/null @@ -1,35 +0,0 @@ -# -# 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. -# -java.naming.factory.initial = org.apache.qpid.jndi.PropertiesFileInitialContextFactory - -# use the following property to configure the default connector -#java.naming.provider.url - ignored. - -# register some connection factories -# connectionfactory.[jndiname] = [ConnectionURL] -connectionfactory.connectionFactory = amqp://guest:guest@clientid/testpath?brokerlist='tcp://localhost:5672' - -# Register an AMQP destination in JNDI -destination.transientQueue = direct://amq.direct//testQueueT?autodelete='true' -destination.durableQueue = direct://amq.direct//testQueueD?durable='true'&autodelete='true' - -destination.transientTopic = topic://amq.topic//testTopicT?autodelete='true' -destination.durableTopic = topic://amq.topic//testTopicD?durable='true'&autodelete='true'&clientid='test'&subscription='testQueueD' - -destination.fanoutQueue = fanout://amq.fanout//fanoutQueue?autodelete='true' diff --git a/java/testkit/etc/test.log4j b/java/testkit/etc/test.log4j deleted file mode 100644 index b574a7b5b7..0000000000 --- a/java/testkit/etc/test.log4j +++ /dev/null @@ -1,28 +0,0 @@ -# -# 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=${root.logging.level} - -log4j.logger.org.apache.qpid=ERROR, console -log4j.additivity.org.apache.qpid=false - -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=%t %d %p [%c{4}] %m%n - diff --git a/java/tools/bin/run_pub.sh b/java/tools/bin/run_pub.sh index 0702a55de9..91b9287dea 100644 --- a/java/tools/bin/run_pub.sh +++ b/java/tools/bin/run_pub.sh @@ -21,4 +21,4 @@ . $QPID_TEST_HOME/bin/setenv.sh echo "$@" -$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfProducer +$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.tools.PerfProducer diff --git a/java/tools/bin/run_sub.sh b/java/tools/bin/run_sub.sh index f7e687de38..c9ad2fed74 100644 --- a/java/tools/bin/run_sub.sh +++ b/java/tools/bin/run_sub.sh @@ -21,5 +21,5 @@ . $QPID_TEST_HOME/bin/setenv.sh echo "$@" -$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfConsumer +$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.tools.PerfConsumer |
