else
return 0
fi
+ if test -n "$html"; then
+ echo >>"$html" "<h2>$1</h2>"
+ fi
echo "*"
echo "* $1 *****"
echo "*"
echo " -n count: number of execution for each bar (default: $count)"
echo " --dry: Do not run the commands, just reuse the data and generate the graph"
echo " --fast: Run less and faster tests"
+ echo " --html: Generate and HTML output"
echo " -h: this help"
}
-n) count="$2"; shift; shift;;
--dry) dry_run=true; shift;;
--fast) fast=true; shift;;
+ --html) html="index.html"; echo >"$html" "<html><head></head><body>"; shift;;
*) stop=true
esac
done
}
bench_compilation_time
+if test -n "$html"; then
+ echo >>"$html" "</body></html>"
+fi
+
if test -n "$died"; then
echo "Some commands failed"
exit 1
{
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'"
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=