You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ce...@apache.org on 2005/04/12 21:21:29 UTC
svn commit: r161095 -
xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v1
xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v2
Author: cezar
Date: Tue Apr 12 12:21:28 2005
New Revision: 161095
URL: http://svn.apache.org/viewcvs?view=rev&rev=161095
Log:
Yana Kadiyska. Fixing DOM perf tests to account for DOM creation time
Modified:
xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v1/DomWalkNLV1.java
xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v1/DomWalkV1.java
xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v2/DomWalkNLV2.java
xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v2/DomWalkV2.java
Modified: xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v1/DomWalkNLV1.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v1/DomWalkNLV1.java?view=diff&r1=161094&r2=161095
==============================================================================
--- xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v1/DomWalkNLV1.java (original)
+++ xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v1/DomWalkNLV1.java Tue Apr 12 12:21:28 2005
@@ -46,18 +46,20 @@
// get the xml cursor
char[] chars = util.createXmlData(flavor, Constants.XML_SIZE);
XmlObject doc = XmlObject.Factory.parse(new CharArrayReader(chars));
- Node node = doc.newDomNode();
+ Node node ;
// warm up the vm
cputime = System.currentTimeMillis();
- for(int i=0; i<iterations; i++){
+ for(int i=0; i<iterations; i++){
+ node = doc.newDomNode();
hash += test.run(node);
}
cputime = System.currentTimeMillis() - cputime;
// run it again for the real measurement
cputime = System.currentTimeMillis();
- for(int i=0; i<iterations; i++){
+ for(int i=0; i<iterations; i++){
+ node = doc.newDomNode();
hash += test.run(node);
}
cputime = System.currentTimeMillis() - cputime;
Modified: xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v1/DomWalkV1.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v1/DomWalkV1.java?view=diff&r1=161094&r2=161095
==============================================================================
--- xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v1/DomWalkV1.java (original)
+++ xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v1/DomWalkV1.java Tue Apr 12 12:21:28 2005
@@ -45,18 +45,20 @@
// get the xml cursor
char[] chars = util.createXmlData(flavor, Constants.XML_SIZE);
XmlObject doc = XmlObject.Factory.parse(new CharArrayReader(chars));
- Node node = doc.newDomNode();
+ Node node ;
// warm up the vm
cputime = System.currentTimeMillis();
- for(int i=0; i<iterations; i++){
+ for(int i=0; i<iterations; i++){
+ node = doc.newDomNode();
hash += test.run(node);
}
cputime = System.currentTimeMillis() - cputime;
// run it again for the real measurement
cputime = System.currentTimeMillis();
- for(int i=0; i<iterations; i++){
+ for(int i=0; i<iterations; i++){
+ node = doc.newDomNode();
hash += test.run(node);
}
cputime = System.currentTimeMillis() - cputime;
Modified: xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v2/DomWalkNLV2.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v2/DomWalkNLV2.java?view=diff&r1=161094&r2=161095
==============================================================================
--- xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v2/DomWalkNLV2.java (original)
+++ xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v2/DomWalkNLV2.java Tue Apr 12 12:21:28 2005
@@ -44,18 +44,20 @@
// get the xml cursor
char[] chars = util.createXmlData(flavor, Constants.XML_SIZE);
XmlObject doc = XmlObject.Factory.parse(new CharArrayReader(chars));
- Node node = doc.getDomNode();
+ Node node ;
// warm up the vm
cputime = System.currentTimeMillis();
- for(int i=0; i<iterations; i++){
+ for(int i=0; i<iterations; i++){
+ node = doc.getDomNode();
hash += test.run(node);
}
cputime = System.currentTimeMillis() - cputime;
// run it again for the real measurement
cputime = System.currentTimeMillis();
- for(int i=0; i<iterations; i++){
+ for(int i=0; i<iterations; i++){
+ node = doc.getDomNode();
hash += test.run(node);
}
cputime = System.currentTimeMillis() - cputime;
Modified: xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v2/DomWalkV2.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v2/DomWalkV2.java?view=diff&r1=161094&r2=161095
==============================================================================
--- xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v2/DomWalkV2.java (original)
+++ xmlbeans/trunk/test/perf/src/org/apache/xmlbeans/test/performance/v2/DomWalkV2.java Tue Apr 12 12:21:28 2005
@@ -43,18 +43,20 @@
// get the xml cursor
char[] chars = util.createXmlData(flavor, Constants.XML_SIZE);
XmlObject doc = XmlObject.Factory.parse(new CharArrayReader(chars));
- Node node = doc.getDomNode();
+ Node node;
// warm up the vm
cputime = System.currentTimeMillis();
- for(int i=0; i<iterations; i++){
+ for(int i=0; i<iterations; i++){
+ node = doc.getDomNode();
hash += test.run(node);
}
cputime = System.currentTimeMillis() - cputime;
// run it again for the real measurement
cputime = System.currentTimeMillis();
- for(int i=0; i<iterations; i++){
+ for(int i=0; i<iterations; i++){
+ node = doc.getDomNode();
hash += test.run(node);
}
cputime = System.currentTimeMillis() - cputime;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org