From 39b991d2f499a490cc132363755b6585350f7385 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Thu, 1 Jul 2010 06:15:31 +0000 Subject: [PATCH] add plotting scripts to cvs --- Robust/TransSim/log/analyze.java | 98 ++++++++++++++++++++++++ Robust/TransSim/log/plotabortpercent.txt | 23 ++++++ Robust/TransSim/log/plotaborttime.txt | 23 ++++++ Robust/TransSim/log/plotall | 18 +++++ Robust/TransSim/log/plotbackofftime.txt | 23 ++++++ Robust/TransSim/log/plotcombined.txt | 19 +++++ Robust/TransSim/log/plotstalltime.txt | 23 ++++++ Robust/TransSim/log/plottime.txt | 23 ++++++ Robust/TransSim/qmerge | 9 +++ Robust/TransSim/qprocess | 9 +++ 10 files changed, 268 insertions(+) create mode 100644 Robust/TransSim/log/analyze.java create mode 100644 Robust/TransSim/log/plotabortpercent.txt create mode 100644 Robust/TransSim/log/plotaborttime.txt create mode 100755 Robust/TransSim/log/plotall create mode 100644 Robust/TransSim/log/plotbackofftime.txt create mode 100644 Robust/TransSim/log/plotcombined.txt create mode 100644 Robust/TransSim/log/plotstalltime.txt create mode 100644 Robust/TransSim/log/plottime.txt create mode 100755 Robust/TransSim/qmerge create mode 100755 Robust/TransSim/qprocess diff --git a/Robust/TransSim/log/analyze.java b/Robust/TransSim/log/analyze.java new file mode 100644 index 00000000..5e6c7264 --- /dev/null +++ b/Robust/TransSim/log/analyze.java @@ -0,0 +1,98 @@ +import java.io.*; + +class analyze { + public static int NUM=30; + public static void main(String files[]) throws Exception { + int M=files.length-1; + String[][] names=new String[NUM][M]; + long[][] times=new long[NUM][M]; + long[][] aborts=new long[NUM][M]; + long[][] commits=new long[NUM][M]; + long[][] stalltime=new long[NUM][M]; + long[][] backofftime=new long[NUM][M]; + long[][] abortedtime=new long[NUM][M]; + for(int i=0;i<(files.length-1);i++) { + BufferedReader br=new BufferedReader(new FileReader(files[i+1])); + String x; + int count=0; + while((x=br.readLine())!=null) { + int index=x.indexOf('='); + names[count][i]=x.substring(0, index); + String n=x.substring(index+1, x.length()); + times[count][i]=Long.parseLong(n); + { + x=br.readLine(); + int i1=x.indexOf('='); + int i2=x.indexOf(' '); + int i3=x.indexOf('=', i2); + String saborts=x.substring(i1+1, i2); + String scommits=x.substring(i3+1, x.length()); + aborts[count][i]=Long.parseLong(saborts); + commits[count][i]=Long.parseLong(scommits); + } + { + x=br.readLine(); + int i1=x.indexOf('='); + int i2=x.indexOf(' '); + int i3=x.indexOf('=', i2); + String stall=x.substring(i1+1, i2); + String backoff=x.substring(i3+1, x.length()); + stalltime[count][i]=Long.parseLong(stall)/(2< filetime.dat +gnuplot plottime.txt +mv filetime.eps ${i}time.eps +java analyze abortpercent log${i}_2filter2 log${i}_4filter2 log${i}_8filter2 > fileabortpercent.dat +gnuplot plotabortpercent.txt +mv fileabortpercent.eps ${i}abortpercent.eps +java analyze aborttime log${i}_2filter2 log${i}_4filter2 log${i}_8filter2 > fileaborttime.dat +gnuplot plotaborttime.txt +mv fileaborttime.eps ${i}aborttime.eps +java analyze stalltime log${i}_2filter2 log${i}_4filter2 log${i}_8filter2 > filestalltime.dat +gnuplot plotstalltime.txt +mv filestalltime.eps ${i}stalltime.eps +java analyze backofftime log${i}_2filter2 log${i}_4filter2 log${i}_8filter2 > filebackofftime.dat +gnuplot plotbackofftime.txt +mv filebackofftime.eps ${i}backofftime.eps +done \ No newline at end of file diff --git a/Robust/TransSim/log/plotbackofftime.txt b/Robust/TransSim/log/plotbackofftime.txt new file mode 100644 index 00000000..c321fa63 --- /dev/null +++ b/Robust/TransSim/log/plotbackofftime.txt @@ -0,0 +1,23 @@ +set bar 1.000000 +set xlabel "Number of Threads" +set ylabel "Backoff Time(Clock Cycles)" +set terminal postscript enhanced eps "Times-Roman" 25 +set boxwidth 0.9 absolute +set style fill pattern 0.00 border -1 +set style rectangle back fc lt -3 fillstyle solid 1.00 border -1 +set key inside right top vertical Left reverse enhanced autotitles columnhead nobox +set style histogram clustered gap 2 title offset character 0, 0, 0 +set datafile missing '-' +#set style data linespoints +set style histogram clustered gap 2 title offset character 0, 0, 0 +set style data histograms +set xtics border in scale 1,0.5 nomirror offset character 0, 0, 0 +set xtics norangelimit +set xrange [-.7:3.7] +set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set grid ytics +set yrange [ 0 : * ] noreverse nowriteback +set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set locale "C" +set output "filebackofftime.eps" +plot 'filebackofftime.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, '' u 8 ti col, '' u 9 ti col, '' u 10 ti col, '' u 11 ti col, '' u 12 ti col, '' u 13 ti col diff --git a/Robust/TransSim/log/plotcombined.txt b/Robust/TransSim/log/plotcombined.txt new file mode 100644 index 00000000..ce787630 --- /dev/null +++ b/Robust/TransSim/log/plotcombined.txt @@ -0,0 +1,19 @@ +set bar 1.000000 +set xlabel "Number of Threads" +set ylabel "Clock Cycles" +set terminal postscript enhanced eps "Times-Roman" 15 +set style fill pattern 4 border -1 +set key off +set style histogram rows +set datafile missing '-' +set style data histograms +set xtics nomirror rotate by -45 scale 0 +set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set grid ytics +set yrange [ 0 : * ] noreverse nowriteback +set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set locale "C" +set output "filecombined.eps" +plot newhistogram "2", 'file2.dat' using 2:xtic(1) ti col with histogram fs pattern 0 ls 0, '' u 3 ti col with histogram fs pattern 1 ls 0, '' u 4 ti col with histogram fs pattern 2 ls 0, '' u 5 ti col with histogram fill pattern 4 ls 0, \ +newhistogram "4", 'file4.dat' using 2:xtic(1) ti col with histogram fs pattern 0 ls 0, '' u 3 ti col with histogram fs pattern 1 ls 0, '' u 4 ti col with histogram fs pattern 2 ls 0, '' u 5 ti col with histogram fs pattern 4 ls 0, \ +newhistogram "8", 'file8.dat' using 2:xtic(1) ti col with histogram fs pattern 0 ls 0, '' u 3 ti col with histogram fs pattern 1 ls 0, '' u 4 ti col with histogram fs pattern 2 ls 0, '' u 5 ti col with histogram fs pattern 4 ls 0 diff --git a/Robust/TransSim/log/plotstalltime.txt b/Robust/TransSim/log/plotstalltime.txt new file mode 100644 index 00000000..df569d43 --- /dev/null +++ b/Robust/TransSim/log/plotstalltime.txt @@ -0,0 +1,23 @@ +set bar 1.000000 +set xlabel "Number of Threads" +set ylabel "Stall Time(Clock Cycles)" +set terminal postscript enhanced eps "Times-Roman" 25 +set boxwidth 0.9 absolute +set style fill pattern 0.00 border -1 +set style rectangle back fc lt -3 fillstyle solid 1.00 border -1 +set key inside right top vertical Left reverse enhanced autotitles columnhead nobox +set style histogram clustered gap 2 title offset character 0, 0, 0 +set datafile missing '-' +#set style data linespoints +set style histogram clustered gap 2 title offset character 0, 0, 0 +set style data histograms +set xtics border in scale 1,0.5 nomirror offset character 0, 0, 0 +set xtics norangelimit +set xrange [-.7:3.7] +set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set grid ytics +set yrange [ 0 : * ] noreverse nowriteback +set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set locale "C" +set output "filestalltime.eps" +plot 'filestalltime.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, '' u 8 ti col, '' u 9 ti col, '' u 10 ti col, '' u 11 ti col, '' u 12 ti col, '' u 13 ti col diff --git a/Robust/TransSim/log/plottime.txt b/Robust/TransSim/log/plottime.txt new file mode 100644 index 00000000..3d2cd6dc --- /dev/null +++ b/Robust/TransSim/log/plottime.txt @@ -0,0 +1,23 @@ +set bar 1.000000 +set xlabel "Number of Threads" +set ylabel "Clock Cycles" +set terminal postscript enhanced eps "Times-Roman" 25 +set boxwidth 0.9 absolute +set style fill pattern 0.00 border -1 +set style rectangle back fc lt -3 fillstyle solid 1.00 border -1 +set key inside right top vertical Left reverse enhanced autotitles columnhead nobox +set style histogram clustered gap 2 title offset character 0, 0, 0 +set datafile missing '-' +#set style data linespoints +set style histogram clustered gap 2 title offset character 0, 0, 0 +set style data histograms +set xtics border in scale 1,0.5 nomirror offset character 0, 0, 0 +set xtics norangelimit +set xrange [-.7:3.7] +set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set grid ytics +set yrange [ 0 : * ] noreverse nowriteback +set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set locale "C" +set output "filetime.eps" +plot 'filetime.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, '' u 8 ti col, '' u 9 ti col, '' u 10 ti col, '' u 11 ti col, '' u 12 ti col, '' u 13 ti col diff --git a/Robust/TransSim/qmerge b/Robust/TransSim/qmerge new file mode 100755 index 00000000..b57f864f --- /dev/null +++ b/Robust/TransSim/qmerge @@ -0,0 +1,9 @@ +#!/bin/bash +for i in KMeans Labyrinth3D Genome Vacation Yada Intruder Bayes SSCA2 +#for i in Vacation Yada Intruder Bayes SSCA2 +do +for t in 2 4 8 +do +cat log${i}_${t}_p1 log${i}_${t}_p2 log${i}_${t}_p3 log${i}_${t}_p4 log${i}_${t}_p5 > log${i}_${t} +done +done \ No newline at end of file diff --git a/Robust/TransSim/qprocess b/Robust/TransSim/qprocess new file mode 100755 index 00000000..272b6e71 --- /dev/null +++ b/Robust/TransSim/qprocess @@ -0,0 +1,9 @@ +#!/bin/bash +for i in KMeans Labyrinth3D Genome Vacation Yada Intruder Bayes SSCA2 +#for i in Vacation Yada Intruder Bayes SSCA2 +do +for t in 2 4 8 +do +grep -e Abort -e Stall log${i}_${t} > log${i}_${t}filter2 +done +done \ No newline at end of file -- 2.34.1