You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2008/07/07 05:44:28 UTC
svn commit: r674391 - in /incubator/qpid/trunk/qpid/java/testkit:
bin/perf_report.sh bin/run_pub.sh bin/run_sub.sh bin/setenv.sh etc/test.log4j
Author: rajith
Date: Sun Jul 6 20:44:28 2008
New Revision: 674391
URL: http://svn.apache.org/viewvc?rev=674391&view=rev
Log:
This is related to QPID-1161.
Made minor modifications to the scripts and added a log4j file for the tests.
The scripts are now modified to use the JAVA_HOME.
Added:
incubator/qpid/trunk/qpid/java/testkit/etc/test.log4j
Modified:
incubator/qpid/trunk/qpid/java/testkit/bin/perf_report.sh
incubator/qpid/trunk/qpid/java/testkit/bin/run_pub.sh
incubator/qpid/trunk/qpid/java/testkit/bin/run_sub.sh
incubator/qpid/trunk/qpid/java/testkit/bin/setenv.sh
Modified: incubator/qpid/trunk/qpid/java/testkit/bin/perf_report.sh
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/testkit/bin/perf_report.sh?rev=674391&r1=674390&r2=674391&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/testkit/bin/perf_report.sh (original)
+++ incubator/qpid/trunk/qpid/java/testkit/bin/perf_report.sh Sun Jul 6 20:44:28 2008
@@ -1,4 +1,4 @@
-#!/bin/sh -xv
+#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -22,8 +22,9 @@
# NB: You must add the Qpid client and common jars to your CLASSPATH
# before running this script
-MAX_SUB_MEM=1024M
-MAX_PUB_MEM=1024M
+SUB_MEM=-Xmx1024M
+PUB_MEM=-Xmx1024M
+LOG_CONFIG=-Dlog4j.configuration="$QPID_TEST_HOME/etc/test.log4j"
. setenv.sh
@@ -42,25 +43,15 @@
# $3 producer options
run_testcase()
{
- sh run_sub.sh $2 > sub.out &
+ sh run_sub.sh $LOG_CONFIG $SUB_MEM $2 > sub.out &
waitfor sub.out "Warming up"
- sh run_pub.sh $3 > pub.out &
+ sh run_pub.sh $LOG_CONFIG $PUB_MEM $3 > pub.out &
waitfor sub.out "Completed the test"
waitfor pub.out "Consumer has completed the test"
sleep 2 #give a grace period to shutdown
print_result $1
}
-run_sub()
-{
- java -cp $CLASSPATH -Xmx$MAX_SUB_MEM $@ org.apache.qpid.testkit.perf.PerfConsumer
-}
-
-run_pub()
-{
- java -cp $CLASSPATH -Xmx$MAX_PUB_MEM $@ org.apache.qpid.testkit.perf.PerfProducer
-}
-
print_result()
{
prod_rate=`cat pub.out | grep "Producer rate" | awk '{print $3}'`
@@ -91,19 +82,19 @@
run_testcase "Dura_Queue_Sync" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dsync_persistence=true"
# Test 4 Topic
-#run_testcase "Topic" "-DtransDest=transientTopic" "-DtransDest=transientTopic -Dwarmup_count=1 -Dmsg_count=10"
+run_testcase "Topic" "-DtransDest=transientTopic" "-DtransDest=transientTopic -Dwarmup_count=1 -Dmsg_count=10"
# Test 5 Durable Topic
-run_testcase "Dura_Topic" "-Ddurable=true -DtransDest=durableTopic" "-Ddurable=true -DtransDest=durableTopic -Dwarmup_count=1 -Dmsg_count=10"
+#run_testcase "Dura_Topic" "-Ddurable=true -DtransDest=durableTopic" "-Ddurable=true -DtransDest=durableTopic -Dwarmup_count=1 -Dmsg_count=10"
# Test 6 Fanout
run_testcase "Fanout" "-DtransDest=fanoutQueue" "-DtransDest=fanoutQueue -Dwarmup_count=1 -Dmsg_count=10"
# Test 7 Small TX
-#run_testcase "Small_Txs_2" "-Ddurable=true -Dtransacted=true -Dtrans_size=1" \
-# "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=1"
+run_testcase "Small_Txs_2" "-Ddurable=true -Dtransacted=true -Dtrans_size=1" \
+ "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=1"
# Test 8 Large TX
-#run_testcase "Large_Txs_1000" "-Ddurable=true -Dtransacted=true -Dtrans_size-10" \
-# "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=10"
+run_testcase "Large_Txs_1000" "-Ddurable=true -Dtransacted=true -Dtrans_size=10" \
+ "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=10"
Modified: incubator/qpid/trunk/qpid/java/testkit/bin/run_pub.sh
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/testkit/bin/run_pub.sh?rev=674391&r1=674390&r2=674391&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/testkit/bin/run_pub.sh (original)
+++ incubator/qpid/trunk/qpid/java/testkit/bin/run_pub.sh Sun Jul 6 20:44:28 2008
@@ -1,4 +1,4 @@
-#!/bin/sh -xv
+#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -24,8 +24,5 @@
. setenv.sh
-MAX_MEM=1024M
-
echo "$@"
-java -cp $CLASSPATH -Xmx$MAX_MEM $@ org.apache.qpid.testkit.perf.PerfProducer
-
+$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfProducer
Modified: incubator/qpid/trunk/qpid/java/testkit/bin/run_sub.sh
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/testkit/bin/run_sub.sh?rev=674391&r1=674390&r2=674391&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/testkit/bin/run_sub.sh (original)
+++ incubator/qpid/trunk/qpid/java/testkit/bin/run_sub.sh Sun Jul 6 20:44:28 2008
@@ -1,4 +1,4 @@
-#!/bin/sh -xv
+#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -24,7 +24,6 @@
. setenv.sh
-MAX_MEM=1024M
-
-java -cp $CLASSPATH -Xmx$MAX_MEM $@ org.apache.qpid.testkit.perf.PerfConsumer
+echo "$@"
+$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfConsumer
Modified: incubator/qpid/trunk/qpid/java/testkit/bin/setenv.sh
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/testkit/bin/setenv.sh?rev=674391&r1=674390&r2=674391&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/testkit/bin/setenv.sh (original)
+++ incubator/qpid/trunk/qpid/java/testkit/bin/setenv.sh Sun Jul 6 20:44:28 2008
@@ -1,4 +1,4 @@
-#!/bin/sh -xv
+#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -36,7 +36,6 @@
# VENDOR_LIB path needs to be set
# for Qpid set this to {qpid_checkout}/java/build/lib
-VENDOR_LIB=""
if [ "$VENDOR_LIB" = "" ] ; then
echo "ERROR: Please set VENDOR_LIB path in the script ...."
exit 1
@@ -46,7 +45,7 @@
[ -d $QPID_TEST_HOME/classes ] || mkdir $QPID_TEST_HOME/classes
CLASSPATH=`find $VENDOR_LIB -name *.jar* | tr '\n' ":"`
-javac -cp $CLASSPATH -d $QPID_TEST_HOME/classes -sourcepath $QPID_TEST_HOME/src `find $QPID_TEST_HOME/src -name '*.java'`
+$JAVA_HOME/bin/javac -cp $CLASSPATH -d $QPID_TEST_HOME/classes -sourcepath $QPID_TEST_HOME/src `find $QPID_TEST_HOME/src -name '*.java'`
export CLASSPATH=$QPID_TEST_HOME/classes:$CLASSPATH
Added: incubator/qpid/trunk/qpid/java/testkit/etc/test.log4j
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/testkit/etc/test.log4j?rev=674391&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/java/testkit/etc/test.log4j (added)
+++ incubator/qpid/trunk/qpid/java/testkit/etc/test.log4j Sun Jul 6 20:44:28 2008
@@ -0,0 +1,31 @@
+#
+# 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.logger.org.apache.qpidity=ERROR, console
+log4j.additivity.org.apache.qpidity=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
+