jstrachan 2002/10/22 06:42:51
Modified: jelly maven.xml
Added: jelly/src/test/org/apache/commons/jelly/benchmark
benchmark.jelly sample.jelly
Log:
added a simlpe benchmark goal that can be used for performance tuning of the core
Jelly engine
Revision Changes Path
1.42 +8 -0 jakarta-commons-sandbox/jelly/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/jelly/maven.xml,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- maven.xml 22 Oct 2002 08:10:12 -0000 1.41
+++ maven.xml 22 Oct 2002 13:42:51 -0000 1.42
@@ -549,4 +549,12 @@
</java>
</goal>
+ <goal name="test:benchmark" prereqs="jelly-task"
+ description="A simple bit of Jelly script used as a benchmark to guage
performance">
+ <java classname="org.apache.commons.jelly.Jelly" fork="yes">
+ <classpath refid="test.classpath"/>
+ <arg value="src/test/org/apache/commons/jelly/benchmark/benchmark.jelly"/>
+ </java>
+ </goal>
+
</project>
1.1
jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/benchmark/benchmark.jelly
Index: benchmark.jelly
===================================================================
<?xml version="1.0"?>
<!-- revaluates the same script many times to test performance -->
<j:jelly xmlns:j="jelly:core" xmlns:bsh="jelly:beanshell">
<bsh:script>
System.out.println( "Started at: " + new java.util.Date() );
</bsh:script>
<j:forEach begin="1" end="1000">
<j:include uri="sample.jelly"/>
</j:forEach>
<bsh:script>
System.out.println( "Finished at: " + new java.util.Date() );
</bsh:script>
</j:jelly>
1.1
jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/benchmark/sample.jelly
Index: sample.jelly
===================================================================
<?xml version="1.0"?>
<!-- a dummy file-->
<j:jelly xmlns:j="jelly:core">
<j:if test="${1==2}">
<static>
<some id="12">
<dummy x="${dummy.whatever}">
this is some static XML
</dummy>
<dummy x="${dummy.whatever}">
some ${e}
</dummy>
</some>
</static>
</j:if>
<j:forEach var="i" begin="1" end="100">
<j:set var="dummy" value="${i}"/>
</j:forEach>
</j:jelly>
--
To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>