cherry-pick generate_plot.sh from dennis_threading branch
authorDennis Schafroth <dennis@indexdata.com>
Thu, 29 Apr 2010 12:09:38 +0000 (14:09 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Thu, 29 Apr 2010 12:09:38 +0000 (14:09 +0200)
Generate gnutplot files instead of assuming the present

Conflicts:

perf/bash/generate_plot.sh [new file with mode: 0644]

diff --git a/perf/bash/generate_plot.sh b/perf/bash/generate_plot.sh
new file mode 100644 (file)
index 0000000..7c819f0
--- /dev/null
@@ -0,0 +1,31 @@
+
+if [ "$1" != "" ] ; then 
+    echo "set terminal $1" > range.gnuplot
+    echo "set terminal $1" > init.gnuplot
+    echo "set terminal $1" > search.gnuplot
+    echo "set terminal $1" > show.gnuplot
+else 
+    echo "" > range.gnuplot
+    echo "" > init.gnuplot
+    echo "" > search.gnuplot
+    echo "" > show.gnuplot
+fi
+
+echo "plot 'range.stat' using 1:2 title 'init', 'range.stat'using 1:3 title 'search', 'range.stat'using 1:4 title 'show'" >> range.gnuplot
+echo "plot 'init.stat' using 1:2 title 'init'" >> init.gnuplot
+echo "plot 'search.stat' using 1:2 title 'Search'" >> search.gnuplot
+echo "plot 'search.stat' using 1:2 title 'Search'" >> show.gnuplot
+
+if [ "$1" != "" ] ; then 
+    gnuplot < range.gnuplot > range.$1
+    gnuplot < init.gnuplot > init.$1
+    gnuplot < search.gnuplot > search.$1
+    gnuplot < show.gnuplot > show.$1
+else 
+    gnuplot < range.gnuplot 
+    gnuplot < init.gnuplot 
+    gnuplot < search.gnuplot
+    gnuplot < show.gnuplot
+fi 
+
+cat range.gnuplot init.gnuplot search.gnuplot show.gnuplot > all.gnuplot