current versions for generating all graphs
[IRC.git] / Robust / src / Benchmarks / SingleTM / toprocess
1 #!/bin/bash
2 for bm in KMeans.bin Labyrinth.bin SSCA2.bin Genome.bin Vacation.bin yada.bin Intruder.bin Bayes.bin
3 do
4 if [ $bm = "KMeans.bin" ]
5 then name="kmeans"
6 fi
7 if [ $bm = "Labyrinth.bin" ]
8 then name="labyrinth"
9 fi
10 if [ $bm = "SSCA2.bin" ]
11 then name="ssca2"
12 fi
13 if [ $bm = "Genome.bin" ]
14 then name="genome"
15 fi
16 if [ $bm = "Vacation.bin" ]
17 then name="vacation"
18 fi
19 if [ $bm = "yada.bin" ]
20 then name="yada"
21 fi
22 if [ $bm = "Intruder.bin" ]
23 then name="intruder"
24 fi
25 if [ $bm = "Bayes.bin" ]
26 then name="bayes"
27 fi
28 echo $bm CSEQ TL2 SWISSTM BASE FIS FISAR DEB DV HYDV OPTSTM > ${bm}_spreadsheet.dat
29 cat logfinalpaper/log/${bm}_1_LOCK_* | grep TIME= > tmpfile
30 base=`java add tmpfile`
31 cat ~/stamp/stamp-0.9.10/log/${name}_seq_1_* | grep -i time > tmpfile
32 cseq=`java add -sec -norm $base tmpfile`
33
34 for num in 1 2 4 8
35 do
36 cat ~/stamp/stamp-0.9.10/log/${name}_stm_${num}_* | grep -i time > tmpfile
37 tl2=`java add -sec -norm $base tmpfile`
38 cat ~/swiss/stamp-0.9.9/log/${name}_stm_${num}_* | grep -i time > tmpfile
39 swiss=`java add -sec -norm $base tmpfile`
40 if [ $num = "1" ]
41 then
42 line="${cseq} ${tl2} ${swiss}"
43 else
44 line="None ${tl2} ${swiss}"
45 fi
46 stddevline=""
47 for type in BASE FIS FISAR DEB DV HYDV OPTSTM
48 do
49 cat logfinalpaper/log/${bm}_${num}_${type}_* | grep TIME= > tmpfile
50 ave=`java add -norm $base tmpfile`
51 stddev=`java add -err tmpfile`
52 line="$line $ave"
53 stddevline="$stddevline $stddev"
54 done
55 echo ${num} ${line} >> ${bm}_spreadsheet.dat
56 done
57 echo set bar 1.000000 > plot_${bm}.txt
58 echo set boxwidth 0.9 absolute >> plot_${bm}.txt
59 echo set style fill pattern 0.00 border -1 >> plot_${bm}.txt
60 echo set style rectangle back fc lt -3 fillstyle  solid 1.00 border -1 >> plot_${bm}.txt
61 echo set key inside left top vertical Right noreverse enhanced autotitles columnhead nobox >> plot_${bm}.txt
62 echo set style histogram clustered gap 2 title  offset character 0, 0, 0 >> plot_${bm}.txt
63 echo set datafile missing \'-\' >> plot_${bm}.txt
64 echo set style data histograms >> plot_${bm}.txt
65 echo set xtics border in scale 1,0.5 nomirror rotate by -45  offset character 0, 0, 0 >> plot_${bm}.txt
66 echo set xtics  norangelimit >> plot_${bm}.txt
67 echo set xrange [-.7:3.7] >> plot_${bm}.txt
68 echo set ylabel  offset character 0, 0, 0 font \"\" textcolor lt -1 rotate by 90 >> plot_${bm}.txt
69 echo set y2label  offset character 0, 0, 0 font \"\" textcolor lt -1 rotate by 90 >> plot_${bm}.txt
70 #echo set yrange [ 0 : 8 ] noreverse nowriteback >> plot_${bm}.txt
71 echo set cblabel  offset character 0, 0, 0 font \"\" textcolor lt -1 rotate by 90 >> plot_${bm}.txt
72 echo set locale \"C\" >> plot_${bm}.txt
73 if [ $name = "intruder" ]
74 then
75 echo plot \'${bm}_spreadsheet.dat\' using 4:xticlabels\(1\) ti col, \'\' u 5 ti col, \'\' u 6 ti col, \'\' u 7 ti col, \'\' u 8 ti col, \'\' u 9 ti col, \'\' u 10 ti col >> plot_${bm}.txt
76 elif [ $name = "ssca2" ]
77 then
78 echo plot \'${bm}_spreadsheet.dat\' using 4:xticlabels\(1\) ti col, \'\' u 5 ti col, \'\' u 6 ti col, \'\' u 7 ti col, \'\' u 8 ti col, \'\' u 9 ti col, \'\' u 10 ti col >> plot_${bm}.txt
79 else
80 echo plot \'${bm}_spreadsheet.dat\' using 4:xticlabels\(1\) ti col, \'\' u 5 ti col, \'\' u 6 ti col, \'\' u 7 ti col, \'\' u 8 ti col, \'\' u 9 ti col, \'\' u 10 ti col, \'\' u 11 ti col >> plot_${bm}.txt
81 fi
82 echo pause -1 >> plot_${bm}.txt
83 done