}
bench_nitmd
+function bench_txtmark()
+{
+ name="$FUNCNAME"
+ skip_test "$name" && return
+ prepare_res $outdir/txtmark.dat "txtmark" "txtmark"
+ for file in $bncdir/*.md; do
+ bench=`basename $file .md`
+ bench_command "$bench" "" "java" "-cp" "$engdir/txtmark/.:$engdir/txtmark/txtmark-0.11.jar" "Txtmark" "$file" "$s"
+ done
+}
+bench_txtmark
+
if test "$#" -gt 0; then
plot $outdir/bench_markdown.gnu
fi
--- /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.
+
+Txtmark.class: txtmark-0.11.jar
+ javac -cp txtmark-0.11.jar Txtmark.java
+
+txtmark-0.11.jar:
+ wget -O txtmark-0.11.jar http://search.maven.org/remotecontent?filepath=com/github/rjeschke/txtmark/0.11/txtmark-0.11.jar
+
+test: Txtmark.class
+ java -cp .:txtmark-0.11.jar Txtmark ../../benches/hello.md 5
+
+clean:
+ rm -rf txtmark-0.11.jar Txtmark.class
--- /dev/null
+import com.github.rjeschke.txtmark.Processor;
+import java.io.File;
+import java.io.IOException;
+
+public class Txtmark {
+ 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])));
+ }
+ }
+}