#!/bin/sh

name="$1"

if [ "x$name" = "x" ]; then
  echo "$0 name"
  exit
fi

#==================
echo "scaling	t/c	connections	tps_inc	tps_exclu"

for file in ${name}_t*_c*
do
      sf="" ; nc="" ; nt=""; tpsi=""; tpse=""

      while read p q r s t u v w x y z
      do
         if [ "x$p $q" = "xscaling factor" ]; then sf="$v" ; continue; fi
         if [ "x$p $q $r" = "xnumber of clients" ]; then nc="$v" ; continue; fi
         if [ "x$p $q $r $s $t" = "xnumber of transactions per client" ]; then nt="$v" ; continue; fi
         if [ "x$p" = "xtps" ]; then
            case $r in
              *include)
                  tpsi=$v
		;;
              *exclude)
                  tpse=$v
		;;
	    esac
         fi
      done < $file
      echo "$sf	$nt	$nc	$tpsi	$tpse"
done



#=================
exit

transaction type                    . . . : TPC-B (sort of)
scaling factor                      . . . : 1
number of clients                     . . : 250
number of transactions per client         : 1024
number of transactions actually processed : 256000/256000
tps ( include connections establishing)   : 133.415273
tps ( exclude connections establishing)   : 133.521406
