aboutsummaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorRob Savoye <rob.savoye@linaro.org>2013-06-18 22:12:06 -0600
committerRob Savoye <rob.savoye@linaro.org>2013-06-18 22:12:57 -0600
commitd57bc1e26f0752b96c19daf9ff120c20caf24b6d (patch)
tree8e220ac17aff8ad4174f648437851105ecd0c085 /bench
parent2ab580d747f12662c8ea49377b4edd6b65430754 (diff)
produce multiple gnuplot command files, one per benchmark and variant
Diffstat (limited to 'bench')
-rwxr-xr-xbench/plot-bench.sh83
1 files changed, 45 insertions, 38 deletions
diff --git a/bench/plot-bench.sh b/bench/plot-bench.sh
index 6a97f385..3ceb60af 100755
--- a/bench/plot-bench.sh
+++ b/bench/plot-bench.sh
@@ -1,14 +1,41 @@
-#!/bin/sh
-
+#!/bin/bash
if test "$#" -eq 0; then
echo "Need to supply a graph name!"
- name="EEMBC Benchmark"
+ name="eembc"
else
name=$1
fi
-cat <<EOF >gnuplot.cmd
+# lines dots steps errorbars xerrorbar xyerrorlines
+# points impulses fsteps errorlines xerrorlines yerrorbars
+# linespoints labels histeps financebars xyerrorbars yerrorlines
+# vectors
+# or
+# boxes candlesticks image circles
+# boxerrorbars filledcurves rgbimage ellipses
+# boxxyerrorbars histograms rgbalpha pm3d
+# boxplot
+
+# specify a different line style
+itype=""
+type="with lines"
+
+#echo "plot "\'eembc.data\'" using (\$7) title "\'Min\'" lt rgb "\'green\'" ${type}, '' using (\$8) title "\'Max\'" lt rgb "\'red\'" ${type}, '' using (\$11) title "\'Best\'" lt rgb "\'cyan\'" ${type}" >> gnuplot.cmd
+#plot "\'eembc.data\'" using (\$4) title "\' Min\'" lt rgb "\'red\'" ${type}, '' using (\$5) title "\'Max\'" lt rgb "\'green\'" ${type}"
+
+# setup aarray of colors, since the number of data files varies
+declare -a colors=('red' 'green' 'cyan' 'blue' 'purple' 'brown' 'coral' 'aqua')
+benchmarks="eembc coremark denbench embc_office spec2000"
+variants="o3-neon o3-arm o3-armv6 o3-vfpv3"
+
+for i in ${benchmarks}; do
+ cindex=0
+ rm -f gnuplot-$i.cmd
+ for j in ${variants}; do
+ if test -f $i.$j.data; then
+ if test ${cindex} -eq 0; then
+ cat <<EOF >gnuplot-$i.cmd
set boxwidth 0.9 relative
set style data histograms
set style histogram cluster
@@ -28,42 +55,22 @@ set key left top
set term png
set output "benchrun.png"
-set xlabel "${name}"
+set xlabel "$i Benchmarks"
set grid ytics lt 0 lw 1 lc rgb "#bbbbbb"
#set grid xtics lt 0 lw 1 lc rgb "#bbbbbb"
EOF
-
-# lines dots steps errorbars xerrorbar xyerrorlines
-# points impulses fsteps errorlines xerrorlines yerrorbars
-# linespoints labels histeps financebars xyerrorbars yerrorlines
-# vectors
-# or
-# boxes candlesticks image circles
-# boxerrorbars filledcurves rgbimage ellipses
-# boxxyerrorbars histograms rgbalpha pm3d
-# boxplot
-
-# specify a different line style
-type=""
-type="with lines"
-
-#echo "plot "\'eembc.data\'" using (\$7) title "\'Min\'" lt rgb "\'green\'" ${type}, '' using (\$8) title "\'Max\'" lt rgb "\'red\'" ${type}, '' using (\$11) title "\'Best\'" lt rgb "\'cyan\'" ${type}" >> gnuplot.cmd
-#echo "plot "\'eembc.data\'" using (\$4) title "\'Min\'" lt rgb "\'red\'" ${type}, '' using (\$5) title "\'Max\'" lt rgb "\'green\'" ${type}" >> gnuplot.cmd
-
-echo "plot "\'eembc.data\'" using (\$6):xtic(2) title "\'Best\'" lt rgb "\'green\'" ${type}" >> gnuplot.cmd
-
-#echo "plot "\'eembc.data\'" using (\$5):xtic(int(\$0)%3==0?stringcolumn(1):\"\") t column(2) title "\'Min\'" lt rgb "\'red\'" ${type}" >> gnuplot.cmd
-
-cat <<EOF >> gnuplot.cmd
-set term x11 persist
-replot
-
-# Line graph
-# set style data linespoints
-# replot
-
-EOF
-
-gnuplot gnuplot.cmd
+ echo -n "plot \"$i.$j.data\" using (\$6):xtic(2) title \"$j\" lt rgb \"${colors[$cindex]}\" ${type}" >> gnuplot-$i.cmd
+
+ else
+ echo -n ", \"$i.$j.data\" using (\$6):xtic(1) title \"$j\" lt rgb \"${colors[$cindex]}\" ${type}" >> gnuplot-$i.cmd
+ fi
+# gnuplot gnuplot-$i.cmd &
+ cindex=`expr $cindex + 1`
+ fi
+ done
+ echo "" >> gnuplot-$i.cmd
+ echo "set term x11 persist" >> gnuplot-$i.cmd
+ echo "replot" >> gnuplot-$i.cmd
+done