Merge: Clean benches
authorJean Privat <jean@pryen.org>
Mon, 19 Jun 2017 20:23:40 +0000 (16:23 -0400)
committerJean Privat <jean@pryen.org>
Mon, 19 Jun 2017 20:23:40 +0000 (16:23 -0400)
Some cleanup in the benchmark/ directory to remove the yellow dots in http://gresil.org/jenkins/job/nit_bench/

Pull-Request: #2505

benchmarks/bench_engines.sh
benchmarks/markdown/engines/Makefile
benchmarks/strings/Makefile
benchmarks/strings/bench_strings.sh

index 505a6ac..6710807 100755 (executable)
@@ -75,6 +75,7 @@ function run_compiler()
                bench_command "nitmd" "markdown" "./nitmd.$title.bin" markdown/benches/out/mixed.md 80
                run_command "$@" ../contrib/jwrapper/src/jwrapper.nit -o "jwrapper.$title.bin"
                bench_command "jwrapper" "jwrapper ant.jar" "./jwrapper.$title.bin" /usr/share/java/ant.jar -o out/ant_jar.nit
+               rm -r tmp 2> /dev/null # remove jwrapper output directory
        fi
 
        rm -r *.bin out 2> /dev/null
@@ -225,6 +226,9 @@ bench_nitc_options "monomorph" "" --direct-call-monomorph0 --direct-call-monomor
 
 bench_nitc_options "misc" "" --log --typing-test-metrics --invocation-metrics --isset-checks-metrics --tables-metrics --no-stacktrace --release --debug #FIXME add --sloppy
 
+# sanitary just run the default configuration, this is used to check that `run_compiler` works.
+bench_nitc_options "sanitary" ""
+
 function bench_nitc-e_gc()
 {
        name="$FUNCNAME"
index 7301d01..1eeda88 100644 (file)
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-all: nitmd/nitmd txtmark/Txtmark.class markdown4j/Markdown4j.class pandoc/pandoc
+all: nitmd/nitmd txtmark/Txtmark.class markdown4j/Markdown4j.class
 
 nitmd/nitmd:
        make -C nitmd
index 2453d1b..d974efa 100644 (file)
@@ -13,6 +13,10 @@ index:
        ./bench_strings.sh index 10000000 50 25 200
 
 check: basic
+       ./bench_strings.sh concat 10000 15 10 2 20
+       ./bench_strings.sh substring 25000 50 25 200
+       ./bench_strings.sh iteration 10000 10 10 100
+       ./bench_strings.sh index 100000 50 25 200
 
 basic:
        ./bench_strings.sh basic
index 55305c9..f4d8353 100755 (executable)
@@ -93,7 +93,7 @@ function bench_concat()
        fi
 
        echo "Generating executable chain_concat for variant $variant"
-       ../../bin/nitc chain_concat.nit -D maxlen=$curr_maxlen
+       ../../bin/nitc chain_concat.nit -D maxlen=$curr_maxln
 
        bench_concat_variant "string" $1 $2 $3 $4 $5
        bench_concat_variant "buffer" $1 $2 $3 $4 $5
@@ -124,7 +124,7 @@ function bench_iteration()
                exit
        fi
        echo "Generating executable iteration_bench for variant $variant"
-       ../../bin/nitc --global iteration_bench.nit -D maxlen=$curr_maxlen
+       ../../bin/nitc --global iteration_bench.nit -D maxlen=$curr_maxln
 
        bench_iterate_variant "iterator" "string" $1 $2 $3 $4
        bench_iterate_variant "index" "string" $1 $2 $3 $4
@@ -157,7 +157,7 @@ function bench_substring()
                exit
        fi
        echo "Generating executable substr_bench for variant $variant"
-       ../../bin/nitc --global substr_bench.nit -D maxlen=$curr_maxlen
+       ../../bin/nitc --global substr_bench.nit -D maxlen=$curr_maxln
 
        bench_substring_variant "string" $1 $2 $3 $4
        bench_substring_variant "buffer" $1 $2 $3 $4
@@ -190,14 +190,15 @@ function bench_compiler()
        ../../bin/nitc ../../src/nitc.nit -o ../../bin/nitc
        echo "nitc (2/2)"
 
-       bench_command nitc nitc_$variant ../../bin/nitc ../../src/nitc.nit -D maxlen=$curr_maxlen
+       bench_command nitc nitc_$variant ../../bin/nitc ../../src/nitc.nit -D maxlen=$curr_maxln
 
        rm nitc
 }
 
 function bench_basic()
 {
-       ../../bin/nitc ../../examples/hello_world.nit -D maxlen=$curr_maxlen
+       echo ../../bin/nitc ../../examples/hello_world.nit -D maxlen=$curr_maxln
+       ../../bin/nitc ../../examples/hello_world.nit -D maxlen=$curr_maxln
        ./hello_world
        rm hello_world
 }