{
echo
echo "# [$2] $3 #"
+ if test -n "$html"; then
+ echo >>"$html" "<p>[$2] $3 <a href=\"$1\">data</a></p>"
+ fi
res=$1
if [ "$plots" = "" ]; then
- plots="plot '$1' using 4:2:3:xticlabels(5) ti '$2';"
+ plots="plot '$1' using 4:2:3:xticlabels(5) ti '$2'"
else
- plots="$plots replot '$1' using 4:2:3 ti '$2';"
+ plots="$plots, '$1' using 4:2:3 ti '$2'"
fi
if [ "$dry_run" = "true" ]; then return; fi
echo "# [$2] $3 ; count=$count" > "$res"
set ylabel "time (s)"
$plots
END
+plots=
+
+if test -n "$html"; then
+ echo "# gnuplot $1"
+ bn=`basename "$1" .gnu`
+ gnuplot -e "set term png; set output \"$bn.png\"" "$1"
+ echo gnuplot -e "set term png; set output \"$bn.png\"" "$1"
+
+ echo >>"$html" "<img src=\"$bn.png\"/>"
+else
echo "# gnuplot -p $1"
gnuplot -p "$1"
- plots=
+fi
}
## GLOBAL VARIABLES ##
# The current stuff to plot (set by prepare_res, used by plot)
plots=
+# The name of the html file if output is set to html
+html=