Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ out/
.idea/
*.iml
classes
.gradle/
33 changes: 33 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apply plugin: 'java'

repositories {
jcenter()
}

configurations {
all*.exclude group: 'ant', module: 'ant'
}

dependencies {
compile group: 'org.apache.velocity', name: 'velocity', version: '+'
compile group: 'org.jamon', name: 'jamon-anttask', version: '+'
compile group: 'org.rythmengine', name: 'rythm-engine', version: '+'
compile group: 'org.freemarker', name: 'freemarker', version: '+'
compile group: 'com.github.httl', name: 'httl', version: '+'
compile group: 'com.floreysoft', name: 'jmte', version: '+'
compile group: 'org.thymeleaf', name: 'thymeleaf', version: '+'
compile group: 'com.github.spullara.mustache.java', name: 'compiler', version: '+'
compile group: 'com.github.jknack', name: 'handlebars', version: '+'

runtime group: 'org.slf4j', name: 'slf4j-simple', version: '+' // for Thymeleaf and Handlebars
}

task discard(type: Delete) {
delete 'lib'
}

task update(type: Copy, dependsOn: discard) {
description 'Attempts to update all dependencies - but BE WARNED, it may downgrade them, upgrade them to an unstable version, or delete them altogether!'
from configurations.runtime
into 'lib'
}
25 changes: 12 additions & 13 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
<sysproperty key="ntimes" value="${ntimes}"/>
<sysproperty key="buf" value="${buf}"/>
<classpath location="classes"/>
<classpath location="${lib}/velocity-1.7.jar"/>
<classpath location="${lib}/velocity-1.7-dep.jar"/>
<classpath refid="project.class.path"/>
</java>
</target>

Expand Down Expand Up @@ -177,36 +176,36 @@
<sysproperty key="out" value="${out}"/>
<sysproperty key="wtimes" value="${wtimes}"/>
<sysproperty key="ntimes" value="${ntimes}"/>
<sysproperty key="buf" value="${buf}"/>
<sysproperty key="handlebars.defaultTemplateLoader"
<sysproperty key="buf" value="${buf}"/>
<sysproperty key="handlebars.defaultTemplateLoader"
value="${handlebars.defaultTemplateLoader}" />
<sysproperty key="handlebars.defaultCache"
<sysproperty key="handlebars.defaultCache"
value="${handlebars.defaultTemplateLoader}" />
<classpath location="classes"/>
<classpath refid="project.class.path"/>
</java>
</target>

<target name="header">
<echo>
#################################################################

JAVA TEMPLATE ENGINE BENCHMARKER v1.0

Output method: ${out}
warm up loops: ${wtimes}
benchmark loops: ${ntimes}
buffer mode: ${buf}
rythm new API: ${rythm.new}

type 'ant help' to see help messsage
################################################################
</echo>
</target>

<target name="selected" depends="header,stringbuilder,freemarker,velocity,beetl,rythm,jamon,httl,jmte,mustache,handlebars"></target>
<target name="all" depends="header,stringbuilder,freemarker,velocity,beetl,rythm,jamon,httl,jmte,jangod,thymeleaf,mustache,handlebars"></target>

<target name="help">
<echo>
==============================================================================
Expand All @@ -215,7 +214,7 @@

This is a benchmark program for a collection of Java template engines

You need apache ant to run the program, just type "ant" and it will start.
You need apache ant to run the program, just type "ant" and it will start.
This program accept parameters to configure how to run the benchmark:

1. out: specify how to output rendering result, could be:
Expand All @@ -231,7 +230,7 @@ This program accept parameters to configure how to run the benchmark:

4. buf: specify whether use BufferedWriter or OS
default: false

5. rythm.new: for rythm engine only. specify whether use new API to
run rythm benchmark or not. Default: false

Expand All @@ -243,7 +242,7 @@ The arguments should be passed in using property setting. e.g
-Dbuf=false \
-Drythm.new=true

Should you have any suggestion or comments, please raise issue via
Should you have any suggestion or comments, please raise issue via
https://github.com/greenlaw110/template-engine-benchmarks/issues

Note since jangod and thymeleaf is way slow than all others, they are not put into the default target. To benchmark jangod and thymeleaf also, run `ant all`
Expand Down
Binary file added lib/asm-3.3.1.jar
Binary file not shown.
Binary file added lib/commons-collections-3.2.1.jar
Binary file not shown.
Binary file added lib/commons-lang-2.4.jar
Binary file not shown.
Binary file removed lib/compiler-0.8.12.jar
Binary file not shown.
Binary file added lib/compiler-0.9.1.jar
Binary file not shown.
Binary file removed lib/freemarker-2.3.19.jar
Binary file not shown.
Binary file added lib/freemarker-2.3.23.jar
Binary file not shown.
Binary file removed lib/guava-15.0.jar
Binary file not shown.
Binary file not shown.
Binary file removed lib/jamon-anttask-2.4.0.jar
Binary file not shown.
Binary file added lib/jamon-anttask-2.4.2.jar
Binary file not shown.
Binary file removed lib/jamon-api-2.3.0.jar
Binary file not shown.
Binary file added lib/jamon-api-2.3.1.jar
Binary file not shown.
Binary file removed lib/jamon-junit-2.4.0.jar
Binary file not shown.
Binary file removed lib/jamon-processor-2.4.0.jar
Binary file not shown.
Binary file added lib/jamon-processor-2.4.2.jar
Binary file not shown.
Binary file removed lib/jamon-runtime-2.4.0.jar
Binary file not shown.
Binary file added lib/jamon-runtime-2.4.1.jar
Binary file not shown.
Binary file removed lib/jamon-stdlib-2.4.0.jar
Binary file not shown.
Binary file removed lib/javaparser-1.0.8.jar
Binary file not shown.
Binary file added lib/javassist-3.16.1-GA.jar
Binary file not shown.
Binary file removed lib/jmte-2.2.jar
Binary file not shown.
Binary file added lib/jmte-3.2.0.jar
Binary file not shown.
Binary file renamed lib/ognl-3.0.5.jar → lib/ognl-3.0.8.jar
Binary file not shown.
Binary file added lib/rhino-1.7R4.jar
Binary file not shown.
Binary file added lib/slf4j-api-1.7.12.jar
Binary file not shown.
Binary file removed lib/slf4j-api-1.7.2.jar
Binary file not shown.
Binary file added lib/slf4j-simple-1.7.12.jar
Binary file not shown.
Binary file removed lib/slf4j-simple-1.7.2.jar
Binary file not shown.
Binary file removed lib/thymeleaf-2.0.15.jar
Binary file not shown.
Binary file added lib/thymeleaf-2.1.4.RELEASE.jar
Binary file not shown.
Binary file added lib/unbescape-1.1.0.RELEASE.jar
Binary file not shown.
Binary file removed lib/velocity-1.7-dep.jar
Binary file not shown.