X-Git-Url: http://nitlanguage.org diff --git a/benchmarks/markdown/bench_markdown.sh b/benchmarks/markdown/bench_markdown.sh index 4cb0f15..7893fa8 100755 --- a/benchmarks/markdown/bench_markdown.sh +++ b/benchmarks/markdown/bench_markdown.sh @@ -24,6 +24,9 @@ source ../bench_plot.sh # Can be overrided with 'the option -n' count=2 +# Default number of times the input file is transformed during a single run +s=200 + ### HELPER FUNCTIONS ## function die() @@ -39,6 +42,7 @@ function usage() echo "run_bench: [options]* benchname" echo " -v: verbose mode" echo " -n count: number of execution for each bar (default: $count)" + echo " -s size: number of transformations for each run (default: $s)" echo " --dry: Do not run the commands, just reuse the data and generate the graph" echo " -h: this help" } @@ -49,6 +53,7 @@ while [ "$stop" = false ]; do -v) verbose=true; shift;; -h) usage; exit;; -n) count="$2"; shift; shift;; + -s) s="$2"; shift; shift;; --dry) dry_run=true; shift;; *) stop=true esac @@ -74,8 +79,6 @@ engdir="./engines" bncdir="./benches/out" mkdir -p $outdir -s=50 - function bench_nitmd() { name="$FUNCNAME" @@ -88,6 +91,18 @@ function bench_nitmd() } bench_nitmd +function bench_nitmd-o() +{ + name="$FUNCNAME" + skip_test "$name" && return + prepare_res $outdir/nitmd-o.dat "nitmd-o" "nitmd-o" + for file in $bncdir/*.md; do + bench=`basename $file .md` + bench_command "$bench" "" "$engdir/nitmd/nitmd-o" "$file" "$s" + done +} +bench_nitmd-o + function bench_txtmark() { name="$FUNCNAME" @@ -112,6 +127,18 @@ function bench_markdown4j() } bench_markdown4j +function bench_pandoc() +{ + name="$FUNCNAME" + skip_test "$name" && return + prepare_res $outdir/pandoc.dat "pandoc" "pandoc" + for file in $bncdir/*.md; do + name=`basename $file .md` + bench_command "$bench" "" "$engdir/pandoc/pandoc" "$file" "$s" + done +} +bench_pandoc + if test "$#" -gt 0; then plot $outdir/bench_markdown.gnu fi