You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2008/09/05 23:21:28 UTC

svn commit: r692556 - in /incubator/qpid/trunk/qpid/cpp/src/tests: benchmark perfdist

Author: aconway
Date: Fri Sep  5 14:21:28 2008
New Revision: 692556

URL: http://svn.apache.org/viewvc?rev=692556&view=rev
Log:
Fixes to distributed test scripts.

Modified:
    incubator/qpid/trunk/qpid/cpp/src/tests/benchmark
    incubator/qpid/trunk/qpid/cpp/src/tests/perfdist

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/benchmark
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/benchmark?rev=692556&r1=692555&r2=692556&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/benchmark (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/benchmark Fri Sep  5 14:21:28 2008
@@ -31,11 +31,13 @@
 }
 # Defaults
 TESTDIR=${TESTDIR:-$PWD}    # Absolute path to test exes on all hosts.
-SCRIPTDIR=${SCRIPTDIR:-$PWD/`dirname $0`}    # Absolute path to test scripts on all hosts.
+SCRIPTDIR=${SCRIPTDIR:-`dirname $0`} #  Path to local test scripts directory.
 SAMPLES=10			# Runs of each test.
 COUNT=${COUNT:-10000}		# Count for pub/sub tests.
 SIZE=${SIZE:-600}		# Size of messages
 ECHO=${ECHO:-1000}		# Count for echo test.
+NSUBS=${NSUBS:-4}
+NPUBS=${NPUBS:-4}
 
 collect() { eval $COLLECT=\""\$$COLLECT $*"\"; }
 COLLECT=ARGS
@@ -44,8 +46,10 @@
 	--testdir) TESTDIR=$2 ; shift 2 ;;
 	--samples) SAMPLES=$2 ; shift 2 ;;
 	--count) COUNT=$2 ; shift 2 ;;
-	--echos) ECHO==$2 ; shift 2 ;;
-	--size) SIZE==$2 ; shift 2 ;;
+	--echos) ECHO=$2 ; shift 2 ;;
+	--size) SIZE=$2 ; shift 2 ;;
+	--nsubs) NSUBS=$2 ; shift 2 ;;
+	--npubs) NPUBS=$2 ; shift 2 ;;
 	--) COLLECT=CLIENTARG; shift ;;
 	---) COLLECT=BROKERARG; shift;;
 	*) collect $1; shift ;;
@@ -74,10 +78,11 @@
     } | tee $FILE
 }
 
+echo "benchmark $*" | tee benchmark.tab
 HEADING="pub	sub	total	Mb"
-dosamples $SCRIPTDIR/perfdist --count $COUNT --nsubs 2 --npubs 2 --qt 2 -s -- ${CLIENTS[*]} --- ${BROKERS[*]}
+dosamples $SCRIPTDIR/perfdist --size $SIZE --count $COUNT --nsubs $NSUBS --npubs $NPUBS -s -- ${CLIENTS[*]} --- ${BROKERS[*]}
 HEADING="pub"
-dosamples ssh -A ${CLIENTS[0]} $TESTDIR/publish --routing-key perftest0 --count $COUNT -s -b ${BROKERS[0]} 
+dosamples ssh -A ${CLIENTS[0]} $TESTDIR/publish --routing-key perftest0 --size $SIZE --count $COUNT -s -b ${BROKERS[0]} 
 HEADING="sub"
 dosamples ssh -A ${CLIENTS[0]} $TESTDIR/consume --queue perftest0 -s --count $COUNT -b ${BROKERS[0]} 
 HEADING="min	max	avg"
@@ -86,4 +91,4 @@
 echo
 echo "Tab separated spreadsheet (also stored in benchmark.tab):"
 echo
-paste $FILES | tee benchmark.tab
+paste $FILES | tee -a benchmark.tab

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/perfdist
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/perfdist?rev=692556&r1=692555&r2=692556&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/perfdist (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/perfdist Fri Sep  5 14:21:28 2008
@@ -55,11 +55,12 @@
     CLIENT=${CLIENTS[i % ${#CLIENTS[*]}]}
     BROKER=${BROKERS[i % ${#BROKERS[*]}]}
     ARGS="$* --broker $BROKER"
-    test -z "$QUIET" && echo "Client $i on $CLIENT: $ARGS"
-    ssh -fT $CLIENT $PERFTEST "$@"
+    cmd="ssh -n $CLIENT $PERFTEST $ARGS"
+    test -z "$QUIET" && echo "Client $i: $cmd"
+    $cmd &
 }
 
-$PERFTEST --setup
+$PERFTEST --setup -b ${BROKERS[0]}
 for (( i=0 ; i < $NPUBS ; ++i)); do start --publish; done
 for (( ; i < $NPUBS+$NSUBS ; ++i)); do start --subscribe; done
-$PERFTEST --control
+$PERFTEST --control  -b ${BROKERS[0]}