Merge branch 'bench'
[nit.git] / benchmarks / bench_engines.sh
index 7c7728b..df4bba2 100755 (executable)
@@ -96,6 +96,9 @@ function skip_test()
        else
                return 0
        fi
+       if test -n "$html"; then
+               echo >>"$html" "<h2>$1</h2>"
+       fi
        echo "*"
        echo "* $1 *****"
        echo "*"
@@ -146,6 +149,7 @@ 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"
 }
 
@@ -157,6 +161,7 @@ while [ "$stop" = false ]; do
                -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
@@ -311,7 +316,7 @@ function bench_nitg-e_options()
 bench_nitg-e_options "slower" --hardening --no-inline-intern --no-union-attribute --no-shortcut-equal --no-shortcut-range
 bench_nitg-e_options "nocheck" --no-check-covariance --no-check-initialization --no-check-assert --no-check-autocast --no-check-other --no-check-erasure-cast
 bench_nitg-e_options "faster" --inline-coloring-numbers
-bench_nitg-e_options "typing" NOALL --bm-typing --phand-typing
+bench_nitg-e_options "typing" NOALL --bm-typing # --phand-typing
 
 function bench_nitc_gc()
 {
@@ -444,6 +449,10 @@ function bench_compilation_time
 }
 bench_compilation_time
 
+if test -n "$html"; then
+       echo >>"$html" "</body></html>"
+fi
+
 if test -n "$died"; then
        echo "Some commands failed"
        exit 1