benchs: produce .xml files conform with junit
[nit.git] / benchmarks / bench_engines.sh
index ba14240..385d033 100755 (executable)
@@ -103,6 +103,9 @@ while [ "$stop" = false ]; do
        esac
 done
 
+xml="bench_engines.xml"
+echo "<testsuites><testsuite>" > "$xml"
+
 NOTSKIPED="$*"
 
 if test -z "$NOTSKIPED"; then
@@ -113,8 +116,8 @@ fi
 
 ## COMPILE ENGINES
 
-# force to use the last nitg, not the bootstraped one
-test -f ./nitg || ../bin/nitg ../src/nitg.nit -v
+# get the bootstrapped nitg
+cp ../bin/nitg .
 
 ## EFFECTIVE BENCHS ##
 
@@ -169,8 +172,8 @@ function bench_nitg-g_options()
 
        plot "$name.gnu"
 }
-bench_nitg-g_options "slower" --hardening
-bench_nitg-g_options "nocheck" --no-check-covariance --no-check-attr-isset --no-check-assert --no-check-autocast --no-check-other
+bench_nitg-g_options "slower" --hardening --no-shortcut-range
+bench_nitg-g_options "nocheck" --no-check-null --no-check-autocast --no-check-attr-isset --no-check-covariance --no-check-assert
 
 function bench_nitg-s_options()
 {
@@ -196,9 +199,9 @@ function bench_nitg-s_options()
 
        plot "$name.gnu"
 }
-bench_nitg-s_options "slower" --hardening --no-inline-intern --no-union-attribute --no-shortcut-equal --no-shortcut-range "--no-gcc-directive likely" "--no-gcc-directive noreturn"
-bench_nitg-s_options "nocheck" --no-check-covariance --no-check-attr-isset --no-check-assert --no-check-autocast --no-check-other
-bench_nitg-s_options "faster" --inline-coloring-numbers --inline-some-methods --direct-call-monomorph "--inline-some-methods --direct-call-monomorph"
+bench_nitg-s_options "slower" --hardening --no-shortcut-equal --no-union-attribute --no-shortcut-range --no-inline-intern "--no-gcc-directive likely --no-gcc-directive noreturn"
+bench_nitg-s_options "nocheck" --no-check-null --no-check-autocast --no-check-attr-isset --no-check-covariance --no-check-assert
+bench_nitg-s_options "faster" --skip-dead-methods --inline-coloring-numbers --inline-some-methods --direct-call-monomorph "--inline-some-methods --direct-call-monomorph" ""
 
 function bench_nitg-e_options()
 {
@@ -224,20 +227,26 @@ function bench_nitg-e_options()
 
        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-attr-isset --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 "slower" --hardening --no-shortcut-equal --no-union-attribute --no-shortcut-range --no-inline-intern
+bench_nitg-e_options "nocheck" --no-check-null --no-check-autocast --no-check-attr-isset --no-check-covariance --no-check-assert --no-check-erasure-cast
+bench_nitg-e_options "faster" --skip-dead-methods --inline-coloring-numbers --inline-some-methods --direct-call-monomorph --rta
 
 function bench_engines()
 {
        name="$FUNCNAME"
        skip_test "$name" && return
-       prepare_res "$name-nitg-g.dat" "nitg-g" "nitg with --global"
-       run_compiler "nitg-g" ./nitg --global
        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-sg.dat" "nitg-sg" "nitg with --separate --semi-global"
+       run_compiler "nitg-sg" ./nitg --separate --semi-global
+       prepare_res "$name-nitg-eg.dat" "nitg-eg" "nitg with --erasure --semi-global"
+       run_compiler "nitg-eg" ./nitg --erasure --semi-global
+       prepare_res "$name-nitg-egt.dat" "nitg-egt" "nitg with --erasure --semi-global --rta"
+       run_compiler "nitg-egt" ./nitg --erasure --semi-global --rta
+       prepare_res "$name-nitg-g.dat" "nitg-g" "nitg with --global"
+       run_compiler "nitg-g" ./nitg --global
        plot "$name.gnu"
 }
 bench_engines
@@ -246,10 +255,12 @@ function bench_nitg-e_gc()
 {
        name="$FUNCNAME"
        skip_test "$name" && return
-       prepare_res "$name-nitg-e-malloc.dat" "nitg-e-malloc" "nitg with --erasure and malloc"
-       NIT_GC_OPTION="malloc" run_compiler "nitg-e-malloc" ./nitg --erasure
        prepare_res "$name-nitg-e.dat" "nitg-e" "nitg with --erasure"
        run_compiler "nitg-e" ./nitg --erasure
+       prepare_res "$name-nitg-e-malloc.dat" "nitg-e-malloc" "nitg with --erasure and malloc"
+       NIT_GC_OPTION="malloc" run_compiler "nitg-e-malloc" ./nitg --erasure
+       prepare_res "$name-nitg-e-large.dat" "nitg-e-large" "nitg with --erasure and large"
+       NIT_GC_OPTION="large" run_compiler "nitg-e-large" ./nitg --erasure
        plot "$name.gnu"
 }
 bench_nitg-e_gc
@@ -324,6 +335,8 @@ if test -n "$html"; then
        echo >>"$html" "</body></html>"
 fi
 
+echo >>"$xml" "</testsuite></testsuites>"
+
 if test -n "$died"; then
        echo "Some commands failed"
        exit 1