commtechs bench: Add parsing of logs

This commit is contained in:
Thomas Preud'homme 2009-06-23 12:45:15 +02:00 committed by Thomas Preud'homme
parent f8c2be9478
commit 857a764485
3 changed files with 54 additions and 2 deletions

View File

@ -17,7 +17,7 @@ nbIter="5000000" # Nb de lignes produites
sizeBuf="1" # En nombre de lignes de cache
# Nom generique des fichiers de log
logFileName="\$perfDirName/cache_\$typeCache-nbProd_\$nbProd-typeProd_\$typeProd-nbIter_\$nbIter-\$bin"
logFileName="\$perfDirName/cache_\$typeCache-nbProd_\$nbProd-typeProd_\$typeProd-nbIter_\$nbIter-\$bin.log"
expDirName="logs"
perfDirName="$expDirName/perfCommMulti-`date +'%F-%Hh%Mm%S'`"

View File

@ -0,0 +1,52 @@
#! /bin/bash
set -u
#comList = `ls | perl -pi -e 's/.*-(\w+)_com/$1/' | sort | uniq`
comList=`ls *.log | perl -ni -e '/-([^-]+)_comm/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
cacheList=`ls *log | perl -ni -e '/cache_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
prodList=`ls *.log | perl -ni -e '/typeProd_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
metriqueList="cache_hits cache_miss cycles"
echo "set style data histogram" > multicores.gnuplot
echo "set style histogram cluster gap 1" >> multicores.gnuplot
echo "set style fill solid border -1" >> multicores.gnuplot
echo "set boxwidth 0.9" >> multicores.gnuplot
echo "set xtic rotate by -45" >> multicores.gnuplot
echo "set bmargin 5" >> multicores.gnuplot
echo "set terminal postscript landscape color" >> multicores.gnuplot
for prod in $prodList ; do
for metrique in $metriqueList ; do
> prod_$prod-$metrique.dat
done
for com in $comList ; do
for metrique in $metriqueList ; do
echo -ne "\n$com\t\t" >> prod_$prod-$metrique.dat
done
for cache in $cacheList ; do
for metrique in $metriqueList ; do
for value in `perl -n -e "print '$1 $2 $3' if /${metrique}.* (\\d+) \\/ (\\d+) \\/ (\\d+)/" cache_$cache-*-typeProd_$prod-*-${com}_comm.log` ; do
echo -ne "\t$value " >> prod_$prod-${metrique}.dat
done
done
done
done
for metrique in $metriqueList ; do
echo "set output 'prod_$prod-$metrique-total.ps'" >> multicores.gnuplot
echo "plot 'prod_$prod-$metrique.dat' using 2:xtic(1) ti 'L2', '' u 5 ti 'MEM'" >> multicores.gnuplot
echo "set output 'prod_$prod-$metrique-byLoop.ps'" >> multicores.gnuplot
echo "plot 'prod_$prod-$metrique.dat' using 3:xtic(1) ti 'L2', '' u 6 ti 'MEM'" >> multicores.gnuplot
echo "set output 'prod_$prod-$metrique-byWrite.ps'" >> multicores.gnuplot
echo "plot 'prod_$prod-$metrique.dat' using 4:xtic(1) ti 'L2', '' u 7 ti 'MEM'" >> multicores.gnuplot
done
done
gnuplot multicores.gnuplot
for f in *.ps ; do
ps2pdf $f
done
acroread *.pdf

@ -1 +1 @@
Subproject commit 6d5117308f78e2ca984691d4440b6a1aa45857b9
Subproject commit 7c0a36703f5514e19d982b377b6de3b77eadd022