+++ /dev/null
-set terminal png truecolor
-
-#if (!exists("bench"))
-# bench = 'bench'
-if (!exists("test_dir"))
- test_dir = 'tests/benchmark'
-
-dat_name = sprintf("benchmark/results/%s.dat", bench)
-
-stats dat_name using 0:2 noout
-max = STATS_max_y+(0.1*STATS_max_y)
-
-set title bench
-set output sprintf("benchmark/results/%s.png", bench)
-set xrange [-0.5:((ceil(STATS_max_x))+0.5)]
-set yrange [0:max]
-set boxwidth 0.50
-set nokey
-set xtics nomirror
-set ytics nomirror
-
-set style fill transparent solid 0.25 # partial transparency
-set style fill noborder # no separate top/bottom lines
-
-plot dat_name using 0:2:($2*($3/100.0)):xtic(2) with boxerrorbar lc "blue" notitle, \
- '' using 0:(max-(0.05*max)):1 with labels
+++ /dev/null
-#!/bin/bash
-
-language=("gwion" "wren" "lua" "python" "chuck" "ruby")
-extension=("gw" "wren" "lua" "py" "ck" "rb")
-test_dir="benchmark"
-result_dir="$test_dir/results"
-plot_script="scripts/bench.plot"
-: "${repeats:=10}"
-
-run() {
- perf stat -r"$repeats" "$1" "$test_dir/$3.$2" 2>&1 | grep "time elapsed" |
- sed 's/ *\([0-9]*\),\([0-9]*\) .* seconds time elapsed *( +- *\([0-9]*\),\([0-9]*\)% )/\1.\2 \3.\4/'
-}
-
-get_list() {
- for file in $test_dir/*.gw
- do basename "$file" .gw
- done
-}
-
-get_test() {
- for i in $(seq 0 ${#language[@]})
- do
- if [ -f "$test_dir/$1.${extension[$i]}" ]
- then echo "${language[$i]} $(run "${language[$i]}" "${extension[$i]}" "$1")"
- fi
- done > "$result_dir/$1.dat"
-}
-
-plot() {
- gnuplot -e "bench='$1'" "$plot_script"
-}
-
-[ -d "$result_dir/results" ] || mkdir "$result_dir"
-for bench in $(get_list)
-do
- get_test "$bench"
- plot "$bench"
-done
[ -d src ] || bash scripts/mdr2mdbook.sh
[ -f src/SUMMARY.md ] || bash scripts/summary.sh > src/SUMMARY.md
-
-[ -d src/assets ] || cp -r benchmark/results src/assets