jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1447698 - in /jackrabbit/oak/trunk: ./ oak-bench/ oak-bench/base/ oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ oak-bench/latest/ oak-bench/latest/src/test/java/org/apache/jackrabbit/oak/performance/ oak-bench/parent/...
Date Tue, 19 Feb 2013 12:44:59 GMT
Author: jukka
Date: Tue Feb 19 12:44:57 2013
New Revision: 1447698

URL: http://svn.apache.org/r1447698
Log:
OAK-641: Improved benchmark tooling

Added:
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/AbstractTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/AbstractTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/Benchmark.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ConcurrentReadTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadWriteTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ConcurrentReadWriteTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/CreateManyChildNodesTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/CreateManyChildNodesTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/DescendantSearchTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/DescendantSearchTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/IndexManager.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/IndexManager.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/LoginLogoutTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginLogoutTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/LoginTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ReadPropertyTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ReadPropertyTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2DescendantSearchTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SQL2DescendantSearchTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2SearchTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SQL2SearchTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SetPropertyTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SetPropertyTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SimpleSearchTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SimpleSearchTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SmallFileReadTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SmallFileReadTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SmallFileWriteTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SmallFileWriteTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/TestInputStream.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/TestInputStream.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/TransientManyChildNodesTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/TransientManyChildNodesTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/UpdateManyChildNodesTest.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/UpdateManyChildNodesTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/JackrabbitRepositoryFixture.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
      - copied, changed from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginLogoutTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/RepositoryFixture.java
Removed:
    jackrabbit/oak/trunk/oak-bench/README.txt
    jackrabbit/oak/trunk/oak-bench/base/pom.xml
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/AbstractPerformanceTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/AbstractTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ConcurrentReadTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ConcurrentReadWriteTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/CreateManyChildNodesTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/DescendantSearchTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/IndexManager.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginLogoutTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ReadPropertyTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SQL2DescendantSearchTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SQL2SearchTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SetPropertyTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SimpleSearchTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SmallFileReadTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SmallFileWriteTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/TestInputStream.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/TransientManyChildNodesTest.java
    jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/UpdateManyChildNodesTest.java
    jackrabbit/oak/trunk/oak-bench/latest/pom.xml
    jackrabbit/oak/trunk/oak-bench/latest/src/test/java/org/apache/jackrabbit/oak/performance/PerformanceBenchmark.java
    jackrabbit/oak/trunk/oak-bench/parent/pom.xml
    jackrabbit/oak/trunk/oak-bench/plot.sh
    jackrabbit/oak/trunk/oak-bench/pom.xml
Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java
    jackrabbit/oak/trunk/oak-run/pom.xml
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java
    jackrabbit/oak/trunk/pom.xml

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java?rev=1447698&r1=1447697&r2=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java Tue Feb 19 12:44:57 2013
@@ -57,7 +57,7 @@ public class Jcr {
 
     private SecurityProvider securityProvider;
 
-    Jcr(Oak oak) {
+    public Jcr(Oak oak) {
         this.oak = oak;
 
         with(new InitialContent());

Modified: jackrabbit/oak/trunk/oak-run/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/pom.xml?rev=1447698&r1=1447697&r2=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-run/pom.xml Tue Feb 19 12:44:57 2013
@@ -130,6 +130,16 @@
       <version>${jackrabbit.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-core</artifactId>
+      <version>${jackrabbit.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-math</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
       <groupId>org.eclipse.jetty</groupId>
       <artifactId>jetty-servlet</artifactId>
       <version>${jetty.version}</version>

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/AbstractTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/AbstractTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/AbstractTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/AbstractTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/AbstractTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/AbstractTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/AbstractTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import java.util.LinkedList;
 import java.util.List;

Added: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/Benchmark.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/Benchmark.java?rev=1447698&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/Benchmark.java (added)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/Benchmark.java Tue Feb 19 12:44:57 2013
@@ -0,0 +1,139 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.jackrabbit.oak.benchmark;
+
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import javax.jcr.Credentials;
+import javax.jcr.Repository;
+import javax.jcr.SimpleCredentials;
+
+import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
+import org.apache.jackrabbit.oak.fixture.JackrabbitRepositoryFixture;
+import org.apache.jackrabbit.oak.fixture.OakRepositoryFixture;
+import org.apache.jackrabbit.oak.fixture.RepositoryFixture;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Maps;
+
+public class Benchmark {
+
+    private static final Map<String, RepositoryFixture> FIXTURES =
+            ImmutableMap.<String, RepositoryFixture>builder()
+            .put("Jackrabbit", new JackrabbitRepositoryFixture())
+            .put("Oak-Memory", new OakRepositoryFixture())
+            .build();
+
+    private static final Map<String, AbstractTest> TESTS =
+            ImmutableMap.<String, AbstractTest>builder()
+            .put("Login",           new LoginTest())
+            .put("LoginLogout",     new LoginLogoutTest())
+            .put("GetProperty",     new ReadPropertyTest())
+            .put("SetProperty",     new SetPropertyTest())
+            .put("SmallRead",       new SmallFileReadTest())
+            .put("SmallWrite",      new SmallFileWriteTest())
+            .put("ConcurrentRead",  new ConcurrentReadTest())
+            .put("ConcurrentWrite", new ConcurrentReadWriteTest())
+            .put("SimpleSearch",    new SimpleSearchTest())
+            .put("SQL2",            new SQL2SearchTest())
+            .put("Descendant",      new DescendantSearchTest())
+            .put("SQL2Descendant",  new SQL2DescendantSearchTest())
+            .put("CreateFlatNode",  new CreateManyChildNodesTest())
+            .put("UpdateFlatNode", new UpdateManyChildNodesTest())
+            .put("TransientSpace", new TransientManyChildNodesTest())
+            .build();
+
+    public static void main(String[] args) throws Exception {
+        Map<String, RepositoryFixture> fixtures = Maps.newLinkedHashMap();
+        Map<String, AbstractTest> tests = Maps.newLinkedHashMap();
+        for (String name : args) {
+            if (FIXTURES.containsKey(name)) {
+                fixtures.put(name, FIXTURES.get(name));
+            } else if (TESTS.containsKey(name)) {
+                tests.put(name, TESTS.get(name));
+            } else {
+                throw new RuntimeException("Unknown argument: " + name);
+            }
+        }
+        if (fixtures.isEmpty()) {
+            fixtures.putAll(FIXTURES);
+        }
+        if (tests.isEmpty()) {
+            tests.putAll(TESTS);
+        }
+
+        for (Map.Entry<String, AbstractTest> test : tests.entrySet()) {
+            System.out.format(
+                    "# %-34.34s     min     10%%     50%%     90%%     max%n",
+                    test.getKey());
+            for (Map.Entry<String, RepositoryFixture> fixture : fixtures.entrySet()) {
+                Repository[] cluster = new Repository[1];
+                fixture.getValue().setUpCluster(cluster);
+                try {
+                    // Run the test
+                    DescriptiveStatistics statistics =
+                            runTest(test.getValue(), cluster[0]);
+                    if (statistics.getN() > 0) {
+                        System.out.format(
+                                "%-36.36s  %6.0f  %6.0f  %6.0f  %6.0f  %6.0f%n",
+                                fixture.getKey(),
+                                statistics.getMin(),
+                                statistics.getPercentile(10.0),
+                                statistics.getPercentile(50.0),
+                                statistics.getPercentile(90.0), statistics.getMax());
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                } finally {
+                    fixture.getValue().tearDownCluster(cluster);
+                }
+            }
+        }
+    }
+
+    private static final Credentials CREDENTIALS =
+            new SimpleCredentials("admin", "admin".toCharArray());
+
+    private static DescriptiveStatistics runTest(AbstractTest test,
+            Repository repository) throws Exception {
+        DescriptiveStatistics statistics = new DescriptiveStatistics();
+
+        test.setUp(repository, CREDENTIALS);
+        try {
+            // Run a few iterations to warm up the system
+            for (int i = 0; i < 5; i++) {
+                test.execute();
+            }
+
+            // Run test iterations, and capture the execution times
+            int iterations = 0;
+            long runtimeEnd =
+                    System.currentTimeMillis()
+                    + TimeUnit.MILLISECONDS.convert(1, TimeUnit.MINUTES);
+            while (iterations++ < 10
+                    || System.currentTimeMillis() < runtimeEnd) {
+                statistics.addValue(test.execute());
+            }
+        } finally {
+            test.tearDown();
+        }
+
+        return statistics;
+    }
+
+}

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ConcurrentReadTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ConcurrentReadTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ConcurrentReadTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import java.util.Random;
 
@@ -57,19 +57,20 @@ public class ConcurrentReadTest extends 
 
     class Reader implements Runnable {
 
-        private Session session;
-
         private final Random random = new Random();
 
         public void run() {
-
             try {
-                session = getRepository().login(
+                Session session = getRepository().login(
                         new SimpleCredentials("admin", "admin".toCharArray()));
-                int i = random.nextInt(NODE_COUNT);
-                int j = random.nextInt(NODE_COUNT);
-                session.getRootNode()
+                try {
+                    int i = random.nextInt(NODE_COUNT);
+                    int j = random.nextInt(NODE_COUNT);
+                    session.getRootNode()
                         .getNode("testroot/node" + i + "/node" + j);
+                } finally {
+                    session.logout();
+                }
             } catch (RepositoryException e) {
                 throw new RuntimeException(e);
             }

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadWriteTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ConcurrentReadWriteTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadWriteTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadWriteTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ConcurrentReadWriteTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ConcurrentReadWriteTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadWriteTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import java.util.Random;
 

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/CreateManyChildNodesTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/CreateManyChildNodesTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/CreateManyChildNodesTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/CreateManyChildNodesTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/CreateManyChildNodesTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/CreateManyChildNodesTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/CreateManyChildNodesTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/DescendantSearchTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/DescendantSearchTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/DescendantSearchTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/DescendantSearchTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/DescendantSearchTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/DescendantSearchTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/DescendantSearchTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.Node;
 import javax.jcr.NodeIterator;

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/IndexManager.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/IndexManager.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/IndexManager.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/IndexManager.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/IndexManager.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/IndexManager.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/IndexManager.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/LoginLogoutTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginLogoutTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/LoginLogoutTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/LoginLogoutTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginLogoutTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginLogoutTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/LoginLogoutTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.Credentials;
 import javax.jcr.Repository;

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/LoginTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/LoginTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/LoginTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/LoginTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.Credentials;
 import javax.jcr.Repository;

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ReadPropertyTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ReadPropertyTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ReadPropertyTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ReadPropertyTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ReadPropertyTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/ReadPropertyTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/ReadPropertyTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.Node;
 import javax.jcr.Session;

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2DescendantSearchTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SQL2DescendantSearchTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2DescendantSearchTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2DescendantSearchTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SQL2DescendantSearchTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SQL2DescendantSearchTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2DescendantSearchTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.query.Query;

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2SearchTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SQL2SearchTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2SearchTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2SearchTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SQL2SearchTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SQL2SearchTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2SearchTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.query.Query;

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SetPropertyTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SetPropertyTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SetPropertyTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SetPropertyTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SetPropertyTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SetPropertyTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SetPropertyTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SimpleSearchTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SimpleSearchTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SimpleSearchTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SimpleSearchTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SimpleSearchTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SimpleSearchTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SimpleSearchTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.Node;
 import javax.jcr.NodeIterator;
@@ -55,8 +55,6 @@ public class SimpleSearchTest extends Ab
             session.save();
         }
 
-        IndexManager.createPropertyIndex(session, "testcount");
-
     }
 
     @Override

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SmallFileReadTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SmallFileReadTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SmallFileReadTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SmallFileReadTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SmallFileReadTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SmallFileReadTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SmallFileReadTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import java.io.InputStream;
 import java.util.Calendar;
@@ -23,8 +23,8 @@ import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.output.NullOutputStream;
+import com.google.common.io.ByteStreams;
+import com.google.common.io.NullOutputStream;
 
 public class SmallFileReadTest extends AbstractTest {
 
@@ -60,7 +60,7 @@ public class SmallFileReadTest extends A
             Node content = file.getNode("jcr:content");
             InputStream stream = content.getProperty("jcr:data").getStream();
             try {
-                IOUtils.copy(stream, new NullOutputStream());
+                ByteStreams.copy(stream, new NullOutputStream());
             } finally {
                 stream.close();
             }

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SmallFileWriteTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SmallFileWriteTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SmallFileWriteTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SmallFileWriteTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SmallFileWriteTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/SmallFileWriteTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SmallFileWriteTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import java.util.Calendar;
 

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/TestInputStream.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/TestInputStream.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/TestInputStream.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/TestInputStream.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/TestInputStream.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/TestInputStream.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/TestInputStream.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import java.io.InputStream;
 import java.util.Random;

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/TransientManyChildNodesTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/TransientManyChildNodesTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/TransientManyChildNodesTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/TransientManyChildNodesTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/TransientManyChildNodesTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/TransientManyChildNodesTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/TransientManyChildNodesTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/UpdateManyChildNodesTest.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/UpdateManyChildNodesTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/UpdateManyChildNodesTest.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/UpdateManyChildNodesTest.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/UpdateManyChildNodesTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/UpdateManyChildNodesTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/UpdateManyChildNodesTest.java Tue Feb 19 12:44:57 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.benchmark;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;

Added: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/JackrabbitRepositoryFixture.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/JackrabbitRepositoryFixture.java?rev=1447698&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/JackrabbitRepositoryFixture.java (added)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/JackrabbitRepositoryFixture.java Tue Feb 19 12:44:57 2013
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.jackrabbit.oak.fixture;
+
+import java.io.File;
+
+import javax.jcr.Repository;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.jackrabbit.core.RepositoryImpl;
+import org.apache.jackrabbit.core.config.RepositoryConfig;
+
+public class JackrabbitRepositoryFixture implements RepositoryFixture {
+
+    @Override
+    public boolean isAvailable() {
+        return true;
+    }
+
+    @Override
+    public void setUpCluster(Repository[] cluster) throws Exception {
+        if (cluster.length == 1) {
+            File directory = new File("jackrabbit-repository");
+            RepositoryConfig config = RepositoryConfig.install(directory);
+            cluster[0] = RepositoryImpl.create(config);
+        } else if (cluster.length > 1) {
+            throw new UnsupportedOperationException("TODO");
+        }
+    }
+
+    @Override
+    public void syncRepositoryCluster(Repository... nodes) {
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    @Override
+    public void tearDownCluster(Repository[] cluster) {
+        for (Repository node : cluster) {
+            RepositoryImpl repository = ((RepositoryImpl) node);
+            File directory = new File(repository.getConfig().getHomeDir());
+            repository.shutdown();
+            FileUtils.deleteQuietly(directory);
+        }
+    }
+
+}

Copied: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java (from r1447697, jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginLogoutTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java?p2=jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java&p1=jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginLogoutTest.java&r1=1447697&r2=1447698&rev=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-bench/base/src/main/java/org/apache/jackrabbit/oak/performance/LoginLogoutTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java Tue Feb 19 12:44:57 2013
@@ -14,34 +14,35 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.performance;
+package org.apache.jackrabbit.oak.fixture;
 
-import javax.jcr.Credentials;
 import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.SimpleCredentials;
 
-public class LoginLogoutTest extends AbstractTest {
+import org.apache.jackrabbit.oak.Oak;
+import org.apache.jackrabbit.oak.jcr.Jcr;
+
+public class OakRepositoryFixture implements RepositoryFixture {
 
     @Override
-    public void setUp(Repository repository, Credentials credentials)
-            throws Exception {
-        super.setUp(repository,
-                new SimpleCredentials("admin", "admin".toCharArray()));
+    public boolean isAvailable() {
+        return true;
     }
-    
+
     @Override
-    public void runTest() throws RepositoryException {
-        Repository repository = getRepository();
-        for (int i = 0; i < 1000; i++) {
-            Session session = repository.login(getCredentials());
-            try {
-                session.getRootNode();
-            } finally {
-                session.logout();
-            }
+    public void setUpCluster(Repository[] cluster) throws Exception {
+        Oak oak = new Oak();
+        for (int i = 0; i < cluster.length; i++) {
+            cluster[i] = new Jcr(oak).createRepository();
         }
     }
 
+    @Override
+    public void syncRepositoryCluster(Repository... nodes) {
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    @Override
+    public void tearDownCluster(Repository[] cluster) {
+    }
+
 }

Added: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/RepositoryFixture.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/RepositoryFixture.java?rev=1447698&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/RepositoryFixture.java (added)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/RepositoryFixture.java Tue Feb 19 12:44:57 2013
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.jackrabbit.oak.fixture;
+
+import javax.jcr.Repository;
+
+public interface RepositoryFixture {
+
+    /**
+     * Checks whether this fixture is currently available. For example
+     * a database-based fixture would only be available when the underlying
+     * database service is running.
+     *
+     * @return <code>true</code> iff the fixture is available
+     */
+    boolean isAvailable();
+
+    /**
+     * Creates a new repository cluster with as many nodes as the given
+     * array has elements. References to the cluster nodes are stored in
+     * the given array. The initial state of the cluster consists of just
+     * the default repository content included by the implementation. The
+     * caller of this method should have exclusive access to the created
+     * cluster. The caller is also responsible for calling
+     * {@link #tearDownCluster(Repository[])} when the test cluster is
+     * no longer needed.
+     *
+     * @param cluster array to which references to all nodes of the
+     *                created cluster should be stored
+     * @throws Exception if the cluster could not be set up
+     */
+    void setUpCluster(Repository[] cluster) throws Exception;
+
+    /**
+     * Ensures that all content changes seen by one of the given cluster
+     * nodes are seen also by all the other given nodes. Used to help
+     * testing features like eventual consistency where the normal APIs
+     * don't make strong enough guarantees to enable writing a test case
+     * without a potentially unbounded wait for changes to propagate
+     * across the cluster.
+     *
+     * @param nodes cluster nodes to be synchronized
+     */
+    void syncRepositoryCluster(Repository... nodes);
+
+    /**
+     * Releases resources associated with the given repository cluster.
+     * The caller of {@link #setUpCluster(Repository[])} shall call this
+     * method once the cluster is no longer needed.
+     *
+     * @param cluster array containing references to all nodes of the cluster
+     */
+    void tearDownCluster(Repository[] cluster);
+
+}

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java?rev=1447698&r1=1447697&r2=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java Tue Feb 19 12:44:57 2013
@@ -26,6 +26,7 @@ import org.apache.jackrabbit.mk.api.Micr
 import org.apache.jackrabbit.mk.core.MicroKernelImpl;
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
+import org.apache.jackrabbit.oak.benchmark.Benchmark;
 import org.apache.jackrabbit.oak.http.OakServlet;
 import org.apache.jackrabbit.oak.jcr.RepositoryImpl;
 import org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider;
@@ -63,13 +64,23 @@ public class Main {
     public static void main(String[] args) throws Exception {
         printProductInfo();
 
-        if (args.length > 0 && "mk".equals(args[0])) {
-            String[] newArgs = new String[args.length - 1];
-            System.arraycopy(args, 1, newArgs, 0, newArgs.length);
-            MicroKernelServer.main(newArgs);
-        } else {
+        String command = "server";
+        if (args.length > 0) {
+            command = args[0];
+            String[] tail = new String[args.length - 1];
+            System.arraycopy(args, 1, tail, 0, tail.length);
+            args = tail;
+        }
+        if ("mk".equals(command)) {
+            MicroKernelServer.main(args);
+        } else if ("benchmark".equals(command)){
+            Benchmark.main(args);
+        } else if ("server".equals(command)){
             HttpServer httpServer = new HttpServer(URI, args);
             httpServer.start();
+        } else {
+            System.err.println("Unknown command: " + command);
+            System.exit(1);
         }
     }
 

Modified: jackrabbit/oak/trunk/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/pom.xml?rev=1447698&r1=1447697&r2=1447698&view=diff
==============================================================================
--- jackrabbit/oak/trunk/pom.xml (original)
+++ jackrabbit/oak/trunk/pom.xml Tue Feb 19 12:44:57 2013
@@ -49,7 +49,6 @@
     <module>oak-lucene</module>
     <module>oak-run</module>
     <module>oak-it</module>
-    <module>oak-bench</module>
     <module>oak-mk-perf</module>
   </modules>
 



Mime
View raw message