#!/bin/sh
# ---------------------------------------------------------------------------
# Protocols test
# Copyright (C) 2007 Bull S.A.S.
# Contact: jonas-team@objectweb.org
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
#
# ---------------------------------------------------------------------------
# $Id: $
# ---------------------------------------------------------------------------


# Generates a report that gives a global comparison. Output format is CSV
# Usage : synt.sh JR484CmiSingleton JR485CmiSingleton JR485Cmi JR485JrmpSingleton JR485CmiSingletonSerial JR485JrmpSingletonSerial

patternList=$*

echo "testType;cltNb;iter;testName;responseTime;inFacadeMethod" 
for i in LookupCreateRemote CreateRemote Remote MetaData
do 
	for j in 1 5 10 20
	do

		for k in 20
#		for k in 200 500
		do
			#echo .
			#echo "TEST=${i} CLT=${j} ITER=${k}" 
			#echo "----------------------------------" 

			for l in ${patternList}
			do
				reportname="${l}_${i}_${j}_${k}_0.report"
				res=`tail -1 report/${reportname} 2>/dev/null`
				if (( $? == 0 ))
				then
					echo "${i};${j};${k};${l};${res}"
				fi
			done
		done
	done
done
