jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1410319 [2/2] - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/ oak-mk-perf/ oak-mk-perf/src/main/java/org/apache/jackrabbit/mk/scenarios/ oak-mk-perf/src/main/java/org/apache/jackrabbit/mk/tasks/ ...
Date Fri, 16 Nov 2012 12:29:46 GMT
Added: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleCommitsTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleCommitsTest.java?rev=1410319&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleCommitsTest.java
(added)
+++ jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleCommitsTest.java
Fri Nov 16 12:29:42 2012
@@ -0,0 +1,62 @@
+/*
+ * 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.mk.tests.perf;
+
+import org.apache.jackrabbit.mk.scenarios.MicroKernelMultipleCommits;
+import org.apache.jackrabbit.mk.testing.MicroKernelMongoTestBase;
+import org.apache.jackrabbit.mk.util.MicroKernelOperation;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class MongoAddNodesMultipleCommitsTest extends MicroKernelMongoTestBase {
+    static String diff;
+    static int nodesNumber = 1000;
+    static String nodeNamePrefix = "N";
+
+    @BeforeClass
+    public static void prepareDiff() {
+        diff = MicroKernelOperation.buildPyramidDiff("/", 0, 10, nodesNumber,
+                nodeNamePrefix, new StringBuilder()).toString();
+    }
+
+    @Test
+    public void testWriteNodesAllNodes1Commit() {
+        MicroKernelMultipleCommits.writeNodesAllNodes1Commit(mk, diff,
+                chronometer);
+    }
+
+    @Ignore
+    @Test
+    public void testWriteNodes1NodePerCommit() {
+        MicroKernelMultipleCommits.writeNodes1NodePerCommit(mk, diff,
+                chronometer);
+    }
+
+    @Test
+    public void testWriteNodes50NodesPerCommit() {
+        MicroKernelMultipleCommits.writeNodes50NodesPerCommit(mk, diff,
+                chronometer);
+    }
+
+    @Test
+    public void testWriteNodes1000NodesPerCommit() {
+        MicroKernelMultipleCommits.writeNodes1000NodesPerCommit(mk, diff,
+                chronometer);
+    }
+
+}

Propchange: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleCommitsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleCommitsTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Added: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleStructuresTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleStructuresTest.java?rev=1410319&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleStructuresTest.java
(added)
+++ jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleStructuresTest.java
Fri Nov 16 12:29:42 2012
@@ -0,0 +1,100 @@
+/*
+ * 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.mk.tests.perf;
+
+import org.apache.jackrabbit.mk.scenarios.MicrokernelDifferentStructures;
+import org.apache.jackrabbit.mk.testing.MicroKernelMongoTestBase;
+
+import org.junit.Test;
+
+public class MongoAddNodesMultipleStructuresTest extends
+        MicroKernelMongoTestBase {
+
+    static long nodesNumber = 100;
+    static String nodeNamePrefix = "N";
+
+    /**
+     * Tree structure:
+     * <p>
+     * rootNode (/)
+     * <p>
+     * N0 N1... Nn-1 Nn
+     */
+    @Test
+    public void testWriteNodesSameLevel() {
+        MicrokernelDifferentStructures.writeNodesSameLevel(mk, chronometer,
+                nodesNumber, nodeNamePrefix);
+    }
+
+    /**
+     * Tree structure:
+     * <p>
+     * rootNode (/)
+     * <p>
+     * N0
+     * <p>
+     * N1
+     * <p>
+     * N2
+     * <p>
+     * N3
+     */
+    @Test
+    public void testWriteNodes1Child() {
+        MicrokernelDifferentStructures.writeNodes1Child(mk, chronometer,
+                nodesNumber, nodeNamePrefix);
+    }
+
+    /**
+     * Tree structure:
+     * <p>
+     * Number of nodes per <b>level</b> =10^(<b>level</b>).
+     * <p>
+     * Each node has 10 children.
+     */
+    @Test
+    public void testWriteNodes10Children() {
+        MicrokernelDifferentStructures.writeNodes10Children(mk, chronometer,
+                nodesNumber, nodeNamePrefix);
+    }
+
+    /**
+     * Tree structure:
+     * <p>
+     * Number of nodes per <b>level</b> =100^(<b>level</b>).
+     * <p>
+     * Each node has 100 children.
+     */
+    @Test
+    public void testWriteNodes100Children() {
+        MicrokernelDifferentStructures.writeNodes100Children(mk, chronometer,
+                nodesNumber, nodeNamePrefix);
+    }
+
+    /**
+     * Tree structure:
+     * <p>
+     * Number of nodes per <b>level</b> =1000^(<b>level</b>).
+     * <p>
+     * Each node has 1000 children.
+     */
+    @Test
+    public void testWriteNodes1000Children() {
+        MicrokernelDifferentStructures.writeNodes1000Children(mk, chronometer,
+                nodesNumber, nodeNamePrefix);
+    }
+}

Propchange: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleStructuresTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesMultipleStructuresTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Added: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesRelativePathTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesRelativePathTest.java?rev=1410319&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesRelativePathTest.java
(added)
+++ jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesRelativePathTest.java
Fri Nov 16 12:29:42 2012
@@ -0,0 +1,45 @@
+/*
+ * 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.mk.tests.perf;
+
+import org.apache.jackrabbit.mk.scenarios.MicroKernelRelativePath;
+import org.apache.jackrabbit.mk.testing.MicroKernelMongoTestBase;
+import org.junit.Test;
+
+public class MongoAddNodesRelativePathTest extends MicroKernelMongoTestBase {
+
+    static String nodeNamePrefix = "N";
+    static int nodesNumber = 1000;
+
+    @Test
+    public void testWriteNodesSameLevel() throws Exception {
+        MicroKernelRelativePath.writeNodesSameLevel(mk, chronometer,
+                nodesNumber, nodeNamePrefix);
+    }
+
+    @Test
+    public void testWriteNodes10Children() {
+        MicroKernelRelativePath.writeNodes10Children(mk, chronometer,
+                nodesNumber, nodeNamePrefix);
+    }
+
+    @Test
+    public void testWriteNodes100Children() {
+        MicroKernelRelativePath.writeNodes100Children(mk, chronometer,
+                nodesNumber, nodeNamePrefix);
+    }
+}

Propchange: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesRelativePathTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoAddNodesRelativePathTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Added: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodes1CommitTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodes1CommitTest.java?rev=1410319&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodes1CommitTest.java
(added)
+++ jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodes1CommitTest.java
Fri Nov 16 12:29:42 2012
@@ -0,0 +1,50 @@
+/*
+ * 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.mk.tests.perf;
+
+import org.apache.jackrabbit.mk.scenarios.ConcurrentAddNodes1Commit;
+import org.apache.jackrabbit.mk.testing.MongoConcurrentMicroKernelTestBase;
+import org.junit.Test;
+
+public class MongoConcurrentAddNodes1CommitTest extends
+        MongoConcurrentMicroKernelTestBase {
+
+    // nodes for each worker
+    int nodesNumber = 1000;
+
+    /**
+     * @Rule public CatchAllExceptionsRule catchAllExceptionsRule = new
+     *       CatchAllExceptionsRule();
+     **/
+    @Test
+    public void testConcurentWritingFlatStructure() throws InterruptedException {
+        ConcurrentAddNodes1Commit.concurentWritingFlatStructure(mks, 3,
+                nodesNumber, chronometer);
+    }
+
+    @Test
+    public void testConcurentWritingPyramid1() throws InterruptedException {
+        ConcurrentAddNodes1Commit.concurentWritingPyramid1(mks, 3, nodesNumber,
+                chronometer);
+    }
+
+    @Test
+    public void testConcurentWritingPyramid2() throws InterruptedException {
+        ConcurrentAddNodes1Commit.concurentWritingPyramid2(mks, 3, nodesNumber,
+                chronometer);
+    }
+}

Propchange: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodes1CommitTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodes1CommitTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Added: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodesMultipleCommitTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodesMultipleCommitTest.java?rev=1410319&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodesMultipleCommitTest.java
(added)
+++ jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodesMultipleCommitTest.java
Fri Nov 16 12:29:42 2012
@@ -0,0 +1,52 @@
+/*
+ * 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.mk.tests.perf;
+
+import org.apache.jackrabbit.mk.scenarios.ConcurrentAddNodesMultipleCommits;
+import org.apache.jackrabbit.mk.testing.MongoConcurrentMicroKernelTestBase;
+import org.junit.Test;
+
+public class MongoConcurrentAddNodesMultipleCommitTest extends
+        MongoConcurrentMicroKernelTestBase {
+
+    // nodes for each worker
+    int nodesNumber = 1000;
+    int numberOfNodesPerCommit = 10;
+
+    /**
+     * @Rule public CatchAllExceptionsRule catchAllExceptionsRule = new
+     *       CatchAllExceptionsRule();
+     */
+    @Test
+    public void testConcurentWritingFlatStructure() throws InterruptedException {
+        ConcurrentAddNodesMultipleCommits.concurentWritingFlatStructure(mks,
+                mkNumber, nodesNumber, numberOfNodesPerCommit, chronometer);
+    }
+
+    @Test
+    public void testConcurentWritingPyramid1() throws InterruptedException {
+        ConcurrentAddNodesMultipleCommits.concurentWritingPyramid1(mks,
+                mkNumber, nodesNumber, numberOfNodesPerCommit, chronometer);
+
+    }
+
+    @Test
+    public void testConcurentWritingPyramid2() throws InterruptedException {
+        ConcurrentAddNodesMultipleCommits.concurentWritingPyramid2(mks,
+                mkNumber, nodesNumber, numberOfNodesPerCommit, chronometer);
+    }
+}

Propchange: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodesMultipleCommitTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-mongomk-perf/src/test/java/org/apache/jackrabbit/mk/tests/perf/MongoConcurrentAddNodesMultipleCommitTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java?rev=1410319&r1=1410318&r2=1410319&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java
Fri Nov 16 12:29:42 2012
@@ -97,7 +97,7 @@ public class CommitCommand extends BaseC
 
     @Override
     public int getNumOfRetries() {
-        return 20;
+        return 100;
     }
 
     @Override
@@ -305,4 +305,4 @@ public class CommitCommand extends BaseC
             throw new Exception(String.format("Update wasn't successful: %s", writeResult));
         }
     }
-}
\ No newline at end of file
+}



Mime
View raw message