bench_engines: always generate an html file
authorJean Privat <jean@pryen.org>
Mon, 14 Sep 2015 18:51:59 +0000 (14:51 -0400)
committerJean Privat <jean@pryen.org>
Mon, 14 Sep 2015 18:51:59 +0000 (14:51 -0400)
There is no reason to not generate it since a lot of thing is already generated.

Signed-off-by: Jean Privat <jean@pryen.org>

benchmarks/bench_engines.sh
benchmarks/bench_plot.sh

index b2534e7..5a7da3d 100755 (executable)
@@ -93,7 +93,6 @@ function usage()
        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"
 }
 
@@ -105,11 +104,14 @@ while [ "$stop" = false ]; do
                -n) count="$2"; shift; shift;;
                --dry) dry_run=true; shift;;
                --fast) fast=true$fast; shift;;
-               --html) html="index.html"; echo >"$html" "<html><head></head><body>"; shift;;
+               --html) shift;; # Deprecated
                *) stop=true
        esac
 done
 
+html="index.html"
+echo >"$html" "<html><head></head><body>"
+
 xml="bench_engines.xml"
 echo "<testsuites><testsuite>" > "$xml"
 
@@ -272,9 +274,7 @@ function bench_compilation_time
 }
 bench_compilation_time
 
-if test -n "$html"; then
-       echo >>"$html" "</body></html>"
-fi
+echo >>"$html" "</body></html>"
 
 echo >>"$xml" "</testsuite></testsuites>"
 
index e874308..08a13e6 100755 (executable)
@@ -103,7 +103,8 @@ if test -n "$html"; then
        echo gnuplot -e "set term png; set output \"$bn.png\"" "$1"
 
        echo >>"$html" "<img src=\"$bn.png\"/>"
-else
+fi
+if test -n "$DISPLAY"; then
        echo "# gnuplot -p $1"
        gnuplot -p "$1"
 fi