summaryrefslogtreecommitdiff
path: root/qpid/java/tools/bin
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2011-07-20 20:46:49 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2011-07-20 20:46:49 +0000
commit66e1048af0c740632764a6ce8004a773eeb01f42 (patch)
tree5758b423a1f3506c7aa5e3edb38f41cfe8f7cd5a /qpid/java/tools/bin
parent33f28e9d4714b52013effed1b2f231893a752f16 (diff)
downloadqpid-python-66e1048af0c740632764a6ce8004a773eeb01f42.tar.gz
Merge branch 'perf' into trunk
Conflicts: qpid/java/tools/bin/perf-report git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1148935 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/tools/bin')
-rwxr-xr-xqpid/java/tools/bin/perf-report37
1 files changed, 19 insertions, 18 deletions
diff --git a/qpid/java/tools/bin/perf-report b/qpid/java/tools/bin/perf-report
index 228f792a52..7de3f2b602 100755
--- a/qpid/java/tools/bin/perf-report
+++ b/qpid/java/tools/bin/perf-report
@@ -21,16 +21,16 @@
# This will run the following test cases defined below and produce
# a report in tabular format.
-SUB_MEM=-Xmx1024M
-PUB_MEM=-Xmx1024M
QUEUE="queue;{create:always,node:{x-declare:{auto-delete:true}}}"
DURA_QUEUE="dqueue;{create:always,node:{durable:true,x-declare:{auto-delete:true}}}"
TOPIC="amq.topic/test"
DURA_TOPIC="amq.topic/test;{create:always,link:{durable:true}}"
+COMMON_CONFIG="-server -Durl=amqp://guest:guest@clientid/testpath?brokerlist='tcp://localhost:5672'"
+
waitfor() { until grep -a -l "$2" $1 >/dev/null 2>&1 ; do sleep 1 ; done ; }
cleanup()
-{
+{
pids=`ps aux | grep java | grep Perf | awk '{print $2}'`
if [ "$pids" != "" ]; then
kill -3 $pids
@@ -42,30 +42,31 @@ cleanup()
# $2 consumer options
# $3 producer options
run_testcase()
-{
- sh run-sub $LOG_CONFIG $SUB_MEM $2 > sub.out &
- waitfor sub.out "Warming up"
- sh run-pub $LOG_CONFIG $PUB_MEM $3 > pub.out &
- waitfor sub.out "Completed the test"
- waitfor pub.out "Consumer has completed the test"
+{
+ sh run-sub $COMMON_CONFIG $2 > sub.out &
+ sh run-pub $COMMON_CONFIG $3 > pub.out &
+ waitfor pub.out "Controller: Completed the test"
sleep 2 #give a grace period to shutdown
- print_result $1
+ print_result $1
+ mv pub.out $1.pub.out
+ mv sub.out $1.sub.out
}
print_result()
{
- prod_rate=`cat pub.out | grep "Producer rate" | awk '{print $3}'`
- sys_rate=`cat sub.out | grep "System Throughput" | awk '{print $4}'`
- cons_rate=`cat sub.out | grep "Consumer rate" | awk '{print $4}'`
- avg_latency=`cat sub.out | grep "Avg Latency" | awk '{print $4}'`
- min_latency=`cat sub.out | grep "Min Latency" | awk '{print $4}'`
- max_latency=`cat sub.out | grep "Max Latency" | awk '{print $4}'`
-
- printf "|%-15s|%15.2f|%13.2f|%13.2f|%11.2f|%11d|%11d|\n" $1 $sys_rate $prod_rate $cons_rate $avg_latency $min_latency $max_latency
+ prod_rate=`cat pub.out | grep "Avg Producer rate" | awk '{print $5}'`
+ sys_rate=`cat pub.out | grep "System Throughput" | awk '{print $4}'`
+ cons_rate=`cat pub.out | grep "Avg Consumer rate" | awk '{print $5}'`
+ avg_latency=`cat pub.out | grep "Avg System Latency" | awk '{print $5}'`
+ min_latency=`cat pub.out | grep "Min System Latency" | awk '{print $5}'`
+ max_latency=`cat pub.out | grep "Max System Latency" | awk '{print $5}'`
+
+ printf "|%-15s|%15.2f|%13.2f|%13.2f|%11.2f|%11.2f|%11.2f|\n" $1 $sys_rate $prod_rate $cons_rate $avg_latency $min_latency $max_latency
echo "------------------------------------------------------------------------------------------------"
}
trap cleanup EXIT
+rm -rf *.out #cleanup old files.
echo "Test report on " `date +%F`
echo "================================================================================================"