}
bench_txtmark
+function bench_markdown4j()
+{
+ name="$FUNCNAME"
+ skip_test "$name" && return
+ prepare_res $outdir/markdown4j.dat "markdown4j" "markdown4j"
+ for file in $bncdir/*.md; do
+ name=`basename $file .md`
+ bench_command "$bench" "" "java" "-cp" "$engdir/markdown4j/.:$engdir/markdown4j/markdown4j-2.2.jar" "Markdown4j" "$file" "$s"
+ done
+}
+bench_markdown4j
+
if test "$#" -gt 0; then
plot $outdir/bench_markdown.gnu
fi
# See the License for the specific language governing permissions and
# limitations under the License.
-all: nitmd/nitmd txtmark/Txtmark.class
+all: nitmd/nitmd txtmark/Txtmark.class markdown4j/Markdown4j.class
nitmd/nitmd:
make -C nitmd
txtmark/Txtmark.class:
make -C txtmark
+markdown4j/Markdown4j.class:
+ make -C markdown4j
+
clean:
make -C nitmd clean
make -C txtmark clean
+ make -C markdown4j clean
--- /dev/null
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2015 Alexandre Terrasa <alexandre@moz-code.org>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Markdown4j.class: markdown4j-2.2.jar
+ javac -cp markdown4j-2.2.jar Markdown4j.java
+
+markdown4j-2.2.jar:
+ wget https://markdown4j.googlecode.com/files/markdown4j-2.2.jar
+
+test: Markdown4j.class
+ java -cp .:markdown4j-2.2.jar Markdown4j ../../benches/hello.md 5
+
+clean:
+ rm -rf markdown4j-2.2.jar
+ rm -rf Markdown4j.class
--- /dev/null
+import com.github.rjeschke.txtmark.Processor;
+import java.io.File;
+import java.io.IOException;
+
+public class Markdown4j {
+ public static void main(String[] args) throws IOException {
+ int n = Integer.parseInt(args[1]);
+ for(int i = 0; i < n; i++) {
+ System.out.println(Processor.process(new File(args[0])));
+ }
+ }
+}