From: bdemsky Date: Sun, 15 Nov 2009 12:35:34 +0000 (+0000) Subject: change the scripts to just generate the plots for the paper...no more spreadsheet X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e7f47bd73050fca0b021693531f2819b872ed35c;p=IRC.git change the scripts to just generate the plots for the paper...no more spreadsheet --- diff --git a/Robust/src/Benchmarks/SingleTM/add.java b/Robust/src/Benchmarks/SingleTM/add.java index b00f56ac..e67a002f 100644 --- a/Robust/src/Benchmarks/SingleTM/add.java +++ b/Robust/src/Benchmarks/SingleTM/add.java @@ -1,40 +1,56 @@ import java.io.*; public class add { public static void main(String args[]) { - String filename=args[0]; - try { - BufferedReader br=new BufferedReader(new FileReader(filename)); - long vals[]=new long[1000]; - int numvals=0; - String nextline=null; - while((nextline=br.readLine())!=null) { - long v; - int start=nextline.indexOf("TIME=")+5; - String num=nextline.substring(start, nextline.length()); - v=Long.parseLong(num); - vals[numvals++]=v; - } - long sum=0; - for(int i=0;i> spreadsheet -echo type, 1, 2, 4, 8 >> spreadsheet -for type in FIS FISAR DEB OPTSTM LOCK DV HYDV +echo $bm FIS FISAR DEB OPSTM DV HYDV > ${bm}_spreadsheet.dat +cat log/${bm}_1_LOCK_* | grep TIME= > tmpfile +base=`java add tmpfile` +for num in 1 2 4 8 do -line=$type +line="" stddevline="" -for num in 1 2 4 8 +for type in FIS FISAR DEB OPTSTM DV HYDV do cat log/${bm}_${num}_${type}_* | grep TIME= > tmpfile -ave=`java add tmpfile` -stddev=`java add tmpfile stddev` -line="$line, $ave" +ave=`java add -norm $base tmpfile` +stddev=`java add -err tmpfile` +line="$line $ave" stddevline="$stddevline, $stddev" done -echo ${line}${stddevline} >> spreadsheet +echo ${num} ${line} ${stddevline} >> ${bm}_spreadsheet.dat done +echo set bar 1.000000 > plot_${bm}.txt +echo set boxwidth 0.9 absolute >> plot_${bm}.txt +echo set style fill pattern 0.00 border -1 >> plot_${bm}.txt +echo set style rectangle back fc lt -3 fillstyle solid 1.00 border -1 >> plot_${bm}.txt +echo set key inside left top vertical Right noreverse enhanced autotitles columnhead nobox >> plot_${bm}.txt +echo set style histogram clustered gap 2 title offset character 0, 0, 0 >> plot_${bm}.txt +echo set datafile missing \'-\' >> plot_${bm}.txt +echo set style data histograms >> plot_${bm}.txt +echo set xtics border in scale 1,0.5 nomirror rotate by -45 offset character 0, 0, 0 >> plot_${bm}.txt +echo set xtics norangelimit >> plot_${bm}.txt +echo set xrange [-.7:3.7] +echo set ylabel offset character 0, 0, 0 font \"\" textcolor lt -1 rotate by 90 >> plot_${bm}.txt +echo set y2label offset character 0, 0, 0 font \"\" textcolor lt -1 rotate by 90 >> plot_${bm}.txt +echo set yrange [ 0 : 8 ] noreverse nowriteback >> plot_${bm}.txt +echo set cblabel offset character 0, 0, 0 font \"\" textcolor lt -1 rotate by 90 >> plot_${bm}.txt +echo set locale \"C\" >> plot_${bm}.txt +echo plot \'${bm}_spreadsheet.dat\' using 2:xticlabels\(1\) ti col, \'\' u 3 ti col, \'\' u 4 ti col, \'\' u 5 ti col, \'\' u 6 ti col, \'\' u 7 ti col >> plot_${bm}.txt +echo pause -1 >> plot_${bm}.txt done \ No newline at end of file