diff options
| author | Alan Conway <aconway@apache.org> | 2007-11-08 21:16:02 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-11-08 21:16:02 +0000 |
| commit | 976252c508b4feebef3b0811f640cd9bf0cfeeaa (patch) | |
| tree | caf8aaccf8466ece25cdf967d3f7752a147978c6 /cpp/src/tests/perfdist | |
| parent | 4fc571434abe0c44016a2c1f0eab9f347221cbbe (diff) | |
| download | qpid-python-976252c508b4feebef3b0811f640cd9bf0cfeeaa.tar.gz | |
src/tests/perfdist: Use ssh to run distributed perftest.
./perfdist for usage.
src/tests/perftest.cpp:
--summary gives one-line report, can cut/paste into spreadsheet for multiple runs.
--purge as initial clean-up step for distributed tests (see perfdist)
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@593321 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/perfdist')
| -rwxr-xr-x | cpp/src/tests/perfdist | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cpp/src/tests/perfdist b/cpp/src/tests/perfdist new file mode 100755 index 0000000000..07338f6822 --- /dev/null +++ b/cpp/src/tests/perfdist @@ -0,0 +1,33 @@ +#!/bin/bash +# +echo $_ +usage() { +cat <<EOF +Distributed perftest with ssh. +Arguments before -- are passed to perftest. +Arguments after -- are treated as host names. +Publisher runs on first host. One listener runs on each +Remaining host. To run multiple liseners on a host, list it more than once. +Do not pass --consumers, --publish or --listen options, they are computed +from the host list. +EOF +exit 1 +} + +while test "$HOSTS" != "$*"; do + case $1 in + --consumers|--publish|--listen) usage ;; + --) shift; PUB="$1" ; shift ; HOSTS="$*" ;; + *) ARGS="$ARGS $1"; shift ;; + esac +done +test -n "$HOSTS" || { echo "No -- found"; usage; } +N=`echo $HOSTS | wc -w` +PERFTEST=`PATH=$PWD:$PATH which perftest` +$PERFTEST --purge $ARGS +ssh $PUB $PERFTEST $ARGS --publish --consumers $N& +for h in $HOSTS; do + ssh $h $PERFTEST $ARGS --listen& +done +wait + |
