README: document nit_env.sh
[nit.git] / benchmarks / bench_engines.sh
index f0e1f7d..37b2fb9 100755 (executable)
@@ -17,6 +17,7 @@
 
 # TODO: cleanup and libify the helper-parts
 
+source ./bench_common.sh
 source ./bench_plot.sh
 
 ## CONFIGURATION OPTIONS ##
@@ -25,81 +26,6 @@ source ./bench_plot.sh
 # Can be overrided with 'the option -n'
 count=2
 
-### HELPER FUNCTIONS ##
-
-function die()
-{
-       echo >&2 "error: $*"
-       died=1
-}
-
-# Run a single command multiple time and store the execution times
-# in the current $res file.
-#
-#  $1: title of the command
-#  $2: long desription of the command
-#  rest: the command to execute
-function bench_command()
-{
-       if [ "$dry_run" = "true" ]; then return; fi
-       local title="$1"
-       local desc="$2"
-       shift
-       shift
-       if test "$verbose" = true; then outputopts="/dev/stdout"; else outputopts="/dev/null"; fi
-       timeout="time.out"
-       echo "$title" > "$timeout"
-       echo "# $desc" >> "$timeout"
-       echo "\$ $@" >> "$timeout"
-       echo
-       echo "** [$title] $desc **"
-       echo " $ $@"
-
-       # Execute the commands $count times
-       for i in `seq 1 "$count"`; do
-               /usr/bin/time -f "%U" -o "$timeout" -a "$@" > $outputopts 2>&1 || die "$1: failed"
-               echo -n "$i. "
-               tail -n 1 "$timeout"
-       done
-
-       line=`compute_stats "$timeout"`
-       echo "$line ($res)"
-       echo $line >> "$res"
-}
-
-# Run a simble command witout storing the execution time
-# Used to display command on verbose and skip long executions when dry_run is given
-# $@ command to execute
-function run_command()
-{
-       if [ "$dry_run" = "true" ]; then return; fi
-       echo " $ $@"
-       "$@" || die "$@: failed"
-}
-
-# Check if the test should be skiped according to its name
-# $1: name of the test
-# $2: description of the test
-# $NOTSKIPED: arguments
-function skip_test()
-{
-       if test -z "$NOTSKIPED"; then
-               echo "* $1"
-               return 0
-       fi
-       if test "$NOTSKIPED" = "all"; then
-               : # Execute anyway
-       elif echo "$1" | egrep "$NOTSKIPED" >/dev/null 2>&1; then
-               : # Found one to execute
-       else
-               return 0
-       fi
-       echo "*"
-       echo "* $1 *****"
-       echo "*"
-       return 1
-}
-
 # HELPER FOR NIT #
 
 # Run standards benchs on a compiler command
@@ -109,26 +35,45 @@ function run_compiler()
 {
        local title=$1
        shift
-       if test -n "$fast"; then
-               run_command "$@" ../src/nitg.nit -o "nitg.$title.bin"
-               bench_command "nitg" "nitg ../src/test_parser.nit" "./nitg.$title.bin" -v --no-cc ../src/test_parser.nit
+       if test "$fast" = truetrue; then
+               run_command "$@" ../examples/hello_world.nit -o "hello.$title.bin"
+               bench_command "hello" "hello_world" "./hello.$title.bin"
+       elif test -n "$fast"; then
+               run_command "$@" ../src/nitc.nit -o "nitc.$title.bin"
+               bench_command "nitc-g" "nitc --global ../src/test_parser.nit" "./nitc.$title.bin" -v --global --no-cc ../src/test_parser.nit
                run_command "$@" ../src/nit.nit -o "nit.$title.bin"
                bench_command "nit" "nit ../src/test_parser.nit ../src/location.nit" "./nit.$title.bin" -v ../src/test_parser.nit -- -n ../src/location.nit
-               run_command "$@" ../examples/shoot/shoot_logic.nit -o "shoot.$title.bin"
+               run_command "$@" ../examples/shoot/src/shoot_logic.nit -o "shoot.$title.bin"
                bench_command "shoot" "shoot_logic" "./shoot.$title.bin"
                run_command "$@" ../tests/bench_bintree_gen.nit -o "bintrees.$title.bin"
                bench_command "bintrees" "bench_bintree_gen 16" "./bintrees.$title.bin" 16
        else
-               run_command "$@" ../src/nitg.nit -o "nitg.$title.bin"
-               bench_command "nitg" "nitg --no-cc ../src/nitmetrics.nit" "./nitg.$title.bin" -v --no-cc ../src/nitmetrics.nit
-               bench_command "nitg-s" "nitg --separate ../src/nitg.nit" "./nitg.$title.bin" -v --no-cc --separate ../src/nitg.nit
+               run_command "$@" ../src/nitc.nit -o "nitc.$title.bin"
+               bench_command "nitc-g" "nitc --global --no-cc ../src/nitls.nit" "./nitc.$title.bin" -v --global --no-cc ../src/nitls.nit
+               bench_command "nitc-s" "nitc --separate ../src/nitc.nit" "./nitc.$title.bin" -v --no-cc --separate ../src/nitc.nit
                run_command "$@" ../src/nit.nit -o "nit.$title.bin"
-               bench_command "nit" "nit ../src/test_parser.nit ../src/rapid_type_analysis.nit" "./nit.$title.bin" -v ../src/test_parser.nit -- -n ../src/rapid_type_analysis.nit
-               run_command "$@" ../examples/shoot/shoot_logic.nit -o "shoot.$title.bin"
-               bench_command "shoot" "shoot_logic 30" "./shoot.$title.bin" 30
+               bench_command "nit-queens" "nit queens.nit 8" "./nit.$title.bin" ../lib/ai/examples/queens.nit -q 8
+               bench_command "nit-nitcc" "nit nitcc.nit calc.sablecc" "./nit.$title.bin" ../contrib/nitcc/src/nitcc.nit ../contrib/nitcc/examples/calc.sablecc
+               rm calc* 2> /dev/null # remove generated cruft
+               run_command "$@" ../src/nitdoc.nit -o "nitdoc.$title.bin"
+               rm -r out 2> /dev/null
+               mkdir out 2> /dev/null
+               bench_command "nitdoc" "nitdoc ../src/nitls.nit" "./nitdoc.$title.bin" -v ../src/nitls.nit -d out
+               run_command "$@" ../examples/shoot/src/shoot_logic.nit -o "shoot.$title.bin"
+               bench_command "shoot" "shoot_logic 15" "./shoot.$title.bin" 15
                run_command "$@" ../tests/bench_bintree_gen.nit -o "bintrees.$title.bin"
-               bench_command "bintrees" "bench_bintree_gen 18" "./bintrees.$title.bin" 18
+               bench_command "bintrees" "bench_bintree_gen 17" "./bintrees.$title.bin" 17
+               #run_command "$@" "../contrib/pep8analysis/src/pep8analysis.nit" -o "pep8a.$title.bin"
+               #bench_command "pep8analisis" "bench_pep8analisis" "./pep8a.$title.bin" "../contrib/pep8analysis/tests/privat/"*.pep
+               run_command "$@" "../lib/ai/examples/queens.nit" -o "queens.$title.bin"
+               bench_command "queens" "bench_queens 13" "./queens.$title.bin" 13
+               run_command "$@" "../lib/ai/examples/puzzle.nit" -o "puzzle.$title.bin"
+               bench_command "puzzle" "puzzle 15-hard" "./puzzle.$title.bin" kleg.mondcafjhbi
+               run_command "$@" "markdown/engines/nitmd/nitmd.nit" -o "nitmd.$title.bin"
+               bench_command "nitmd" "markdown" "./nitmd.$title.bin" markdown/benches/out/mixed.md 80
        fi
+
+       rm -r *.bin out 2> /dev/null
 }
 
 ## HANDLE OPTIONS ##
@@ -150,11 +95,18 @@ while [ "$stop" = false ]; do
                -h) usage; exit;;
                -n) count="$2"; shift; shift;;
                --dry) dry_run=true; shift;;
-               --fast) fast=true; shift;;
+               --fast) fast=true$fast; 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"
+
 NOTSKIPED="$*"
 
 if test -z "$NOTSKIPED"; then
@@ -165,265 +117,161 @@ fi
 
 ## COMPILE ENGINES
 
-test -f ../src/nitc_3 || ../src/ncall.sh -O
-test -f ./nitg || ../src/nitc_3 ../src/nitg.nit -O -v
-
-## EFFECTIVE BENCHS ##
+# get the bootstrapped nitc
+cp ../bin/nitc .
 
-function bench_nitg_bootstrap()
-{
-       name="$FUNCNAME"
-       skip_test "$name" && return
-       prepare_res "$name.dat" "" "Steps of the bootstrap of nitg by nitc"
-       rm nit?_nit*
-       cp ../src/nitc_3 ./nitc_nitc.bin
-       bench_command "c/c c" "nitc_nitc ../src/nitc.nit -> nitc_nitc (stability)" ./nitc_nitc.bin -O ../src/nitc.nit -o nitc_nitc.bin
-       bench_command "c/c g" "nitc_nitc ../src/nitg.nit -> nitg_nitc" ./nitc_nitc.bin -O ../src/nitg.nit -o nitg_nitc.bin
-       bench_command "g/c g" "nitg_nitc ../src/nitg.nit -> nitg_nitg" ./nitg_nitc.bin ../src/nitg.nit -o nitg_nitg.bin
-       bench_command "g/g g" "nitg_nitg ../src/nitg.nit -> nitg_nitg (stability)" ./nitg_nitg.bin ../src/nitg.nit -o nitg_nitg.bin
+if test -z "$fast"; then
+       make -C markdown/benches
+       make -C ../contrib/nitcc
+fi
 
-       plot "$name.gnu"
-}
-bench_nitg_bootstrap
+## EFFECTIVE BENCHS ##
 
 function bench_steps()
 {
        name="$FUNCNAME"
        skip_test "$name" && return
-       prepare_res "$name-nitc.dat" "nitc" "Various steps of nitc"
-       bench_command "parse" "" ../src/nitc_3 --only-parse ../src/nitg.nit
-       bench_command "metamodel" "" ../src/nitc_3 --only-metamodel ../src/nitg.nit
-       bench_command "generate c" "" ../src/nitc_3 --no-cc ../src/nitg.nit
-       bench_command "full" "" ../src/nitc_3 -O ../src/nitg.nit -o "nitg_nitg.bin"
-
-       prepare_res "$name-nitc-g.dat" "nitc-g" "Various steps of nitc --global"
-       bench_command "parse" "" ../src/nitc_3 --global --only-parse ../src/nitg.nit
-       bench_command "metamodel" "" ../src/nitc_3 --global --only-metamodel ../src/nitg.nit
-       bench_command "generate c" "" ../src/nitc_3 --global --no-cc ../src/nitg.nit
-       bench_command "full" "" ../src/nitc_3 -O --global ../src/nitg.nit -o "nitg_nitc-g.bin"
-
-       prepare_res "$name-nitg.dat" "nitg" "Various steps of nitg"
-       bench_command "parse" "" ./nitg --only-parse ../src/nitg.nit
-       bench_command "metamodel" "" ./nitg --only-metamodel ../src/nitg.nit
-       bench_command "generate c" "" ./nitg --no-cc ../src/nitg.nit
-       bench_command "full" "" ./nitg ../src/nitg.nit -o "nitg_nitg.bin"
-
-       prepare_res "$name-nitg-e.dat" "nitg-e" "Various steps of nitg --erasure"
-       bench_command "parse" "" ./nitg --erasure --only-parse ../src/nitg.nit
-       bench_command "metamodel" "" ./nitg --erasure --only-metamodel ../src/nitg.nit
-       bench_command "generate c" "" ./nitg --erasure --no-cc ../src/nitg.nit
-       bench_command "full" "" ./nitg --erasure ../src/nitg.nit -o "nitg_nitg-e.bin"
+       prepare_res "$name-nitc.dat" "nitc-g" "Various steps of nitc --global"
+       bench_command "parse" "" ./nitc --global --only-parse ../src/nitc.nit
+       bench_command "metamodel" "" ./nitc --global --only-metamodel ../src/nitc.nit
+       bench_command "generate c" "" ./nitc --global --no-cc ../src/nitc.nit
+       bench_command "full" "" ./nitc --global ../src/nitc.nit -o "nitc_nitc.bin"
+
+       prepare_res "$name-nitc-s.dat" "nitc-s" "Various steps of nitc --separate"
+       bench_command "parse" "" ./nitc --separate --only-parse ../src/nitc.nit
+       bench_command "metamodel" "" ./nitc --separate --only-metamodel ../src/nitc.nit
+       bench_command "generate c" "" ./nitc --separate --no-cc ../src/nitc.nit
+       bench_command "full" "" ./nitc --separate ../src/nitc.nit -o "nitc_nitc-e.bin"
+
+       prepare_res "$name-nitc-e.dat" "nitc-e" "Various steps of nitc --erasure"
+       bench_command "parse" "" ./nitc --erasure --only-parse ../src/nitc.nit
+       bench_command "metamodel" "" ./nitc --erasure --only-metamodel ../src/nitc.nit
+       bench_command "generate c" "" ./nitc --erasure --no-cc ../src/nitc.nit
+       bench_command "full" "" ./nitc --erasure ../src/nitc.nit -o "nitc_nitc-e.bin"
 
        plot "$name.gnu"
 }
 bench_steps
 
-# $#: options to compare
-function bench_nitg_options()
+# Simple script to compare various options on nitc
+#
+# usage: *name* *common* [NOALL] *options*...
+#
+# * *name*, the name of the bench
+# * *common*, options to use on each case
+# * NOALL, optional flag to avoid a last case including all additional options
+# * *options*, sequences of options, one for each case
+#
+# Example: `bench_nitc_options "foo" "-a -b" -c "-d -e"` generates 4 cases:
+#
+# * only *common*: `nitc -a -b`
+# * *common* and first *options*: `nitc -a -b -c`
+# * *common* and second *options*: `nitc -a -b -d -e`
+# * all: *common* and all *options*: `nitc -a -b -c -d -e`
+function bench_nitc_options()
 {
        tag=$1
        shift
-       name="$FUNCNAME-$tag"
-       skip_test "$name" && return
-       prepare_res "$name.dat" "no options" "nitg without options"
-       run_compiler "nitg" ./nitg
-
-       if test -n "$2"; then
-               prepare_res "$name-all.dat" "all" "nitg with all options $@"
-               run_compiler "nitg-$tag" ./nitg $@
-       fi
-
-       for opt in "$@"; do
-               prepare_res "$name$opt.dat" "$opt" "nitg with option $opt"
-               run_compiler "nitg$opt" ./nitg $opt
-       done
-
-       plot "$name.gnu"
-}
-bench_nitg_options "hardening" --hardening
-bench_nitg_options "nocheck" --no-check-covariance --no-check-initialization --no-check-assert --no-check-autocast --no-check-other
-
-function bench_nitg-s_options()
-{
-       tag=$1
+       common=$1
        shift
-       name="$FUNCNAME-$tag"
+       name="$FUNCNAME-$tag$common"
+       name=${name// /}
        skip_test "$name" && return
-       prepare_res "$name.dat" "no options" "nitg-s without options"
-       run_compiler "nitg-s" ./nitg --separate
+       prepare_res "$name.dat" "no options" "nitc $common without more options"
+       run_compiler "nitc-$name" ./nitc $common
 
-       if test -n "$2"; then
-               prepare_res "$name-all.dat" "all" "nitg-s with all options $@"
-               run_compiler "nitg-s-$tag" ./nitg --separate $@
+       if test "$1" = NOALL; then
+               withall=
+               shift
+       else
+               withall=true
        fi
 
        for opt in "$@"; do
-               prepare_res "$name$opt.dat" "$opt" "nitg-s with option $opt"
-               run_compiler "nitg-s$opt" ./nitg --separate $opt
+               ot=${opt// /}
+               prepare_res "$name$ot.dat" "$opt" "nitc with option $opt"
+               run_compiler "nitc-$name" ./nitc $common $opt
        done
 
-       plot "$name.gnu"
-}
-bench_nitg-s_options "slower" --hardening --no-inline-intern --generic-resolution-tree --no-union-attribute --no-shortcut-equal --no-shortcut-range
-bench_nitg-s_options "nocheck" --no-check-covariance --no-check-initialization --no-check-assert --no-check-autocast --no-check-other
-bench_nitg-s_options "faster" --inline-coloring-numbers
-bench_nitg-s_options "typing" --bm-typing --phand-typing --phmod-typing
-
-function bench_nitg-e_options()
-{
-       tag=$1
-       shift
-       name="$FUNCNAME-$tag"
-       skip_test "$name" && return
-       prepare_res "$name.dat" "no options" "nitg-e without options"
-       run_compiler "nitg-e" ./nitg --erasure
-
-       if test -n "$2"; then
-               prepare_res "$name-all.dat" "all" "nitg-e with all options $@"
-               run_compiler "nitg-e-$tag" ./nitg --erasure $@
+       if test -n "$2" -a -n "$withall"; then
+               prepare_res "$name-all.dat" "all" "nitc with all options $@"
+               run_compiler "nitc-$name" ./nitc $common $@
        fi
 
-       for opt in "$@"; do
-               prepare_res "$name$opt.dat" "$opt" "nitg-e with option $opt"
-               run_compiler "nitg-e$opt" ./nitg --erasure $opt
-       done
-
        plot "$name.gnu"
 }
-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" --bm-typing --phand-typing --phmod-typing
 
-function bench_nitc_gc()
-{
-       name="$FUNCNAME"
-       skip_test "$name" && return
-       for gc in nitgc boehm malloc large; do
-               prepare_res "$name-$gc.dat" "$gc" "nitc with gc=$gc"
-               export NIT_GC_OPTION="$gc"
-               run_compiler "nitc" ../src/nitc_3 -O
-       done
+bench_nitc_options "slower" --global --hardening --no-shortcut-range
+bench_nitc_options "nocheck" --global --no-check-null --no-check-autocast --no-check-attr-isset --no-check-covariance --no-check-assert
 
-       plot "$name.gnu"
-}
-bench_nitc_gc
+bench_nitc_options "slower" --separate --hardening --no-shortcut-equal --no-union-attribute --no-shortcut-range --no-inline-intern "--no-gcc-directive likely --no-gcc-directive noreturn" "--no-tag-primitives" "--colo-dead-methods" --type-poset
+bench_nitc_options "nocheck" --separate --no-check-null --no-check-autocast --no-check-attr-isset --no-check-covariance --no-check-assert
+bench_nitc_options "faster" --separate --skip-dead-methods --inline-coloring-numbers --inline-some-methods --direct-call-monomorph "--inline-some-methods --direct-call-monomorph"
 
-function bench_nitc_boost()
-{
-       name="$FUNCNAME"
-       skip_test "$name" && return
-       prepare_res "$name-slow.dat" "no -O" "nitc without -O"
-       run_compiler "nitc_slow" ../src/nitc_3
-       prepare_res "$name-fast.dat" "-O" "nitc with -O"
-       run_compiler "nitc" ../src/nitc_3 -O
+bench_nitc_options "slower" --erasure --hardening --no-shortcut-equal --no-union-attribute --no-shortcut-range --no-inline-intern
+bench_nitc_options "nocheck" --erasure --no-check-null --no-check-autocast --no-check-attr-isset --no-check-covariance --no-check-assert --no-check-erasure-cast --no-check-all
+bench_nitc_options "faster" --erasure --skip-dead-methods --inline-coloring-numbers --inline-some-methods --direct-call-monomorph --rta
 
-       plot "$name.gnu"
-}
-bench_nitc_boost
+bench_nitc_options "engine" "" NOALL "--separate" "--erasure" "--separate --semi-global" "--erasure --semi-global" "--erasure --semi-global --rta" "--global"
+bench_nitc_options "policy" "" NOALL "--separate" "--erasure" "--separate --no-check-covariance" "--erasure --no-check-covariance --no-check-erasure-cast"
+bench_nitc_options "nullables" "" "--no-check-attr-isset" "--no-union-attribute"
+bench_nitc_options "linkboost" "" NOALL --trampoline-call --colors-are-symbols "--colors-are-symbols --trampoline-call" "--separate --link-boost" "--separate --colors-are-symbols --guard-call" "--separate --colors-are-symbols --direct-call-monomorph0" "--substitute-monomorph"
+bench_nitc_options "monomorph" "" --direct-call-monomorph0 --direct-call-monomorph
 
-function bench_engines()
-{
-       name="$FUNCNAME"
-       skip_test "$name" && return
-       prepare_res "$name-nitc.dat" "nitc" "nitc"
-       run_compiler "nitc" ../src/nitc_3 -O
-       prepare_res "$name-nitc-g.dat" "nitc-g" "nitc with --global"
-       run_compiler "nitc-g" ../src/nitc_3 -O --global
-       prepare_res "$name-nitg.dat" "nitg" "nitg"
-       run_compiler "nitg" ./nitg
-       prepare_res "$name-nitg-s.dat" "nitg-s" "nitg with --separate"
-       run_compiler "nitg-s" ./nitg --separate
-       prepare_res "$name-nitg-e.dat" "nitg-e" "nitg with --erasure"
-       run_compiler "nitg-e" ./nitg --erasure
-       plot "$name.gnu"
-}
-bench_engines
-
-function bench_nitc_vc_nitg-e()
-{
-       name="$FUNCNAME"
-       skip_test "$name" && return
-       prepare_res "$name-nitc.dat" "nitc" "nitc"
-       run_compiler "nitc" ../src/nitc_3 -O
-       prepare_res "$name-nitc-malloc.dat" "nitc-malloc" "nitc with malloc"
-       NIT_GC_OPTION="malloc" run_compiler "nitc" ../src/nitc_3 -O
-       prepare_res "$name-nitc-bohem.dat" "nitc-boehm" "nitc with boehm"
-       NIT_GC_OPTION="boehm" run_compiler "nitc" ../src/nitc_3 -O
-       prepare_res "$name-nitg-e-nockeck-malloc.dat" "nitg-e-nc-malloc" "nitg with --erasure --no-check-autocast --no-check-erasure-cast and malloc"
-       run_compiler "nitg-e-nc-malloc" ./nitg --erasure --no-check-autocast --no-check-erasure-cast --make-flags "CFLAGS=\"-O2 -DNOBOEHM\""
-       prepare_res "$name-nitg-e-nockeck.dat" "nitg-e-nc" "nitg with --erasure --no-check-autocast --no-check-erasure-cast"
-       run_compiler "nitg-e-nc" ./nitg --erasure --no-check-autocast --no-check-erasure-cast
-       prepare_res "$name-nitg-e.dat" "nitg-e" "nitg with --erasure"
-       run_compiler "nitg-e" ./nitg --erasure
-       plot "$name.gnu"
-}
-bench_nitc_vc_nitg-e
+bench_nitc_options "misc" "" --log --typing-test-metrics --invocation-metrics --isset-checks-metrics --tables-metrics --no-stacktrace --release --debug #FIXME add --sloppy
 
-function bench_nitg-e_gc()
+function bench_nitc-e_gc()
 {
        name="$FUNCNAME"
        skip_test "$name" && return
-       prepare_res "$name-nitg-e-malloc.dat" "nitg-e-malloc" "nitg with --erasure and malloc"
-       run_compiler "nitg-e-malloc" ./nitg --erasure --make-flags "CFLAGS=\"-g -O2 -DNOBOEHM\""
-       prepare_res "$name-nitg-e-noatomic.dat" "nitg-e-noatomic" "nitg with --erasure and no atomic"
-       run_compiler "nitg-e-noatomic" ./nitg --erasure --make-flags "CFLAGS=\"-g -O2 -DNOBOEHM_ATOMIC\""
-       prepare_res "$name-nitg-e.dat" "nitg-e" "nitg with --erasure"
-       run_compiler "nitg-e" ./nitg --erasure
+       prepare_res "$name-nitc-e.dat" "nitc-e" "nitc with --erasure"
+       run_compiler "nitc-e" ./nitc --erasure
+       prepare_res "$name-nitc-e-malloc.dat" "nitc-e-malloc" "nitc with --erasure and malloc"
+       NIT_GC_OPTION="malloc" run_compiler "nitc-e-malloc" ./nitc --erasure
+       prepare_res "$name-nitc-e-large.dat" "nitc-e-large" "nitc with --erasure and large"
+       NIT_GC_OPTION="large" run_compiler "nitc-e-large" ./nitc --erasure
        plot "$name.gnu"
 }
-bench_nitg-e_gc
+bench_nitc-e_gc
 
-function bench_cc_nitg-e()
+function bench_cc_nitc-e()
 {
        name="$FUNCNAME"
        skip_test "$name" && return
        for o in "gcc0:CC=\"ccache gcc\" CFLAGS=-O0" "cl0:CC=\"ccache clang\" CFLAGS=-O0" "gccs:CC=\"ccache gcc\" CFLAGS=-Os" "cls:CC=\"ccache clang\" CFLAGS=-Os" "gcc2:CC=\"ccache gcc\" CFLAGS=-O2" "cl2:CC=\"ccache clang\" CFLAGS=-O2" "gcc3:CC=\"ccache gcc\" CFLAGS=-O3"  "cl3:CC=\"ccache clang\" CFLAGS=-O3"; do
                f=`echo "$o" | cut -f1 -d:`
                o=`echo "$o" | cut -f2 -d:`
-               prepare_res "$name-nitg-e-$f.dat" "nitg-e-$f" "nitg with --erasure --make-flags $o"
-               run_compiler "nitg-e-$f" ./nitg --erasure --make-flags "$o"
+               prepare_res "$name-nitc-e-$f.dat" "nitc-e-$f" "nitc with --erasure --make-flags $o"
+               run_compiler "nitc-e-$f" ./nitc --erasure --make-flags "$o"
        done
        plot "$name.gnu"
 }
-bench_cc_nitg-e
-
-function bench_policy()
-{
-       name="$FUNCNAME"
-       skip_test "$name" && return
-       prepare_res "$name-nitg-s.dat" "nitg-s" "nitg with --separate"
-       run_compiler "nitg-s" ./nitg --separate
-       prepare_res "$name-nitg-e.dat" "nitg-e" "nitg with --erasure"
-       run_compiler "nitg-e" ./nitg --erasure
-       prepare_res "$name-nitg-su.dat" "nitg-su" "nitg with --separate --no-check-covariance"
-       run_compiler "nitg-su" ./nitg --separate --no-check-covariance
-       prepare_res "$name-nitg-eu.dat" "nitg-eu" "nitg with --erasure --no-check-covariance --no-check-erasure-cast"
-       run_compiler "nitg-eu" ./nitg --erasure --no-check-covariance --no-check-erasure-cast
-       plot "$name.gnu"
-}
-bench_policy
+bench_cc_nitc-e
 
 function bench_compilation_time
 {
        name="$FUNCNAME"
        skip_test "$name" && return
-       prepare_res "$name-nitc.dat" "nitc" "nitc"
-       for i in ../examples/hello_world.nit ../src/test_parser.nit ../src/nitg.nit; do
-               bench_command `basename "$i" .nit` "" ../src/nitc_3 -O "$i" --no-cc
+       prepare_res "$name-nitc-g.dat" "nitc-g" "nitc --global"
+       for i in ../examples/hello_world.nit ../src/test_parser.nit ../src/nitc.nit; do
+               bench_command `basename "$i" .nit` "" ./nitc --global "$i" --no-cc
        done
-       prepare_res "$name-nitg.dat" "nitg" "nitg"
-       for i in ../examples/hello_world.nit ../src/test_parser.nit ../src/nitg.nit; do
-               bench_command `basename "$i" .nit` "" ./nitg "$i" --no-cc
+       prepare_res "$name-nitc-s.dat" "nitc-s" "nitc --separate"
+       for i in ../examples/hello_world.nit ../src/test_parser.nit ../src/nitc.nit; do
+               bench_command `basename "$i" .nit` "" ./nitc --separate "$i" --no-cc
        done
-       prepare_res "$name-nitg-e.dat" "nitg-e" "nitg --erasure"
-       for i in ../examples/hello_world.nit ../src/test_parser.nit ../src/nitg.nit; do
-               bench_command `basename "$i" .nit` "" ./nitg --erasure "$i" --no-cc
+       prepare_res "$name-nitc-e.dat" "nitc-e" "nitc --erasure"
+       for i in ../examples/hello_world.nit ../src/test_parser.nit ../src/nitc.nit; do
+               bench_command `basename "$i" .nit` "" ./nitc --erasure "$i" --no-cc
        done
        plot "$name.gnu"
 }
 bench_compilation_time
 
+echo >>"$html" "</body></html>"
+
+echo >>"$xml" "</testsuite></testsuites>"
+
 if test -n "$died"; then
        echo "Some commands failed"
        exit 1