Friday, September 28, 2007

Ok, finally ready to run the first test,

Using netcat, and under the approximate same conditions of woijtek.

I created a small, simple shell script to measure the throughput and cycle in between. I will deploy it also in lxb6118 to get comparative results.

here's the script :)

#!/bin/bash
# @author dfrodrig
# createFileXMessages.sh
# this program does the following:
# 1. creates an $expIteration number of messages on base 2, each message is $messageTemplate.
# 2. sends the created messages to $BROKER
# 3. outputs the time needed to send the n messages to $timeLogFile (Stomp n SEND command with one CONNECT and one DISCONNECT)

messageTemplate=messageTemplate
expIteration=21
timeLogFile=timedResults$expIteration.log
BROKER='lxb6117 6163'
testRunComments=$1

echo '' >> $timeLogFile
echo ''`date`''$HOST''$BROKER'' >> $timeLogFile
echo ''$expIteration'' >> $timeLogFile
echo '' `cat $messageTemplate` '' >> $timeLogFile
echo '' $testRunComments '' >> $timeLogFile

echo "#######################################################"
echo "# #"
echo "# GMAN tests for Amq #"
echo "# Sending 2^"$expIteration " messages to " i $BROKER
echo "# Results output to " $timeLogFile.
echo "# Messages template: " $messageTemplate
echo "# #"
echo "#######################################################"

#creates 2^numberMessages messages
for j in `seq $expIteration`
do
filename=Messages$j
echo 'Iteration ' $j ' Filename ' $filename
if [ -r $filename ]
then
rm $filename
fi
cat $messageTemplate > $filename
for i in `seq $j`
do
cat $filename $filename > MessagesTmp
mv MessagesTmp $filename
done
numberMessages=`grep -a SEND $filename | wc -l`
echo ''$numberMessages'' >> $timeLogFile
echo 'Timing.' $numberMessages ' messages sent from: ' $filename
#For some reason, the time being used by bash is not the /usr/bin/time, even though it seems to be a proper alias :S
#read: http://freebsd.amazingdev.com/blog/archives/000873.html for more info
echo '' >> $timeLogFile
echo '
' >> $timeLogFile
echo 'Iteration #' $j 'finished '
echo '#'
rm ncoutput
rm $filename
done

echo '
' >> $timeLogFile
echo 'Program finished. Test Results output to ' $timeLogFile




I have started running some tests, I'll try to use wassh too. Now it's time to start thinking about which tests should i run.

No comments: