jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r992973 - /jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/ConcurrentReadTest.java
Date Mon, 06 Sep 2010 08:47:02 GMT
Author: jukka
Date: Mon Sep  6 08:47:02 2010
New Revision: 992973

URL: http://svn.apache.org/viewvc?rev=992973&view=rev
Log:
JCR-2699: Improve read/write concurrency

Measure random access time in the concurrency test to avoid asymmetries between the measured
reader and the background readers

Modified:
    jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/ConcurrentReadTest.java

Modified: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/ConcurrentReadTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/ConcurrentReadTest.java?rev=992973&r1=992972&r2=992973&view=diff
==============================================================================
--- jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/ConcurrentReadTest.java
(original)
+++ jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/ConcurrentReadTest.java
Mon Sep  6 08:47:02 2010
@@ -19,7 +19,6 @@ package org.apache.jackrabbit.performanc
 import java.util.Random;
 
 import javax.jcr.Node;
-import javax.jcr.NodeIterator;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
@@ -73,12 +72,9 @@ public class ConcurrentReadTest extends 
     }
 
     public void runTest() throws Exception {
-        NodeIterator i = root.getNodes();
-        while (i.hasNext()) {
-            NodeIterator j = i.nextNode().getNodes();
-            while (j.hasNext()) {
-                j.nextNode();
-            }
+        Reader reader = new Reader();
+        for (int i = 0; i < 1000; i++) {
+            reader.run();
         }
     }
 



Mime
View raw message