diff --git a/BCLOUD b/BCLOUD index d2420f7b8..2d079e5cd 100644 --- a/BCLOUD +++ b/BCLOUD @@ -1 +1 @@ -BUILD_SUBMITTER -x -e CENTOS6U3 -m baidu/xbu-data/hugegraph -c "export MAVEN_HOME=/home/scmtools/buildkit/maven/apache-maven-3.3.9/ && export JAVA_HOME=/home/scmtools/buildkit/java/jdk1.8.0_25/ && export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH && cd baidu/xbu-data/hugegraph && sh build.sh" -u ./ +BUILD_SUBMITTER -x -e CENTOS6U3 -m baidu/xbu-data/hugegraph -c "export MAVEN_HOME=/home/scmtools/buildkit/maven/apache-maven-3.3.9/ && export JAVA_HOME=/home/scmtools/buildkit/java/jdk1.8.0_25/ && export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH && cd baidu/xbu-data/hugegraph && sh build.sh && mkdir output && cp BCLOUD ./output/" -u ./ diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Query.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Query.java index 140cbe1ea..1d3d2c775 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Query.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Query.java @@ -37,7 +37,7 @@ public class Query implements Cloneable { public static final long NO_LIMIT = Long.MAX_VALUE; public static final long NO_CAPACITY = -1L; - public static final long DEFAULT_CAPACITY = 100000L; // HugeGraph-777 + public static final long DEFAULT_CAPACITY = 800000L; // HugeGraph-777 private HugeType resultType; private Map orders; diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/ProcessPerformanceSuite.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/ProcessPerformanceSuite.java new file mode 100644 index 000000000..2c97c0a54 --- /dev/null +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/ProcessPerformanceSuite.java @@ -0,0 +1,84 @@ +/* + * 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 com.baidu.hugegraph.tinkerpop; + +import org.apache.commons.configuration.ConfigurationException; +import org.apache.tinkerpop.gremlin.AbstractGremlinSuite; +import org.apache.tinkerpop.gremlin.GraphManager; +import org.apache.tinkerpop.gremlin.GraphProvider; +import org.apache.tinkerpop.gremlin.process.TraversalPerformanceTest; +import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine; +import org.apache.tinkerpop.gremlin.structure.Graph; +import org.apache.tinkerpop.gremlin.structure.StructureStandardSuite; +import org.junit.runners.model.InitializationError; +import org.junit.runners.model.RunnerBuilder; +import org.junit.runners.model.Statement; + +import com.baidu.hugegraph.dist.RegisterUtil; + +/** + * The {@code ProcessPerformanceSuite} is a JUnit test runner that executes the + * Gremlin Test Suite over a Graph implementation. This suite contains + * "long-run" tests that produce reports on the traversal execution + * performance of a vendor implementation {@link Graph}. Its usage is optional + * to providers as the tests are somewhat redundant to those found elsewhere + * in other required test suites. + *

+ * For more information on the usage of this suite, + * please see {@link StructureStandardSuite}. + * + * @author Stephen Mallette (http://stephen.genoprime.com) + * @deprecated As of release 3.2.0-incubating, replaced by gremlin-benchmark. + */ +@Deprecated +public class ProcessPerformanceSuite extends AbstractGremlinSuite { + + /** + * This list of tests in the suite that will be executed. + * Gremlin developers should add to this list + * as needed to enforce tests upon implementations. + */ + private static final Class[] allTests = new Class[]{ + TraversalPerformanceTest.class + }; + + public ProcessPerformanceSuite(final Class klass, + final RunnerBuilder builder) + throws InitializationError, + ConfigurationException { + super(klass, builder, allTests, null, true, + TraversalEngine.Type.STANDARD); + RegisterUtil.registerBackends(); + } + + @Override + protected Statement withAfterClasses(final Statement statement) { + Statement wrappedStatement = new Statement() { + @Override + public void evaluate() throws Throwable { + statement.evaluate(); + GraphProvider gp = GraphManager.setGraphProvider(null); + ((TestGraphProvider) gp).clearBackends(); + GraphManager.setGraphProvider(gp); + } + }; + return super.withAfterClasses(wrappedStatement); + } +} diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/ProcessPerformanceTest.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/ProcessPerformanceTest.java new file mode 100644 index 000000000..b9c63fc6a --- /dev/null +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/ProcessPerformanceTest.java @@ -0,0 +1,30 @@ +/* + * 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 com.baidu.hugegraph.tinkerpop; + +import org.apache.tinkerpop.gremlin.GraphProviderClass; +import org.junit.runner.RunWith; + +@RunWith(ProcessPerformanceSuite.class) +@GraphProviderClass(provider = ProcessTestGraphProvider.class, + graph = TestGraph.class) +public class ProcessPerformanceTest { +} + diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/StructurePerformanceSuite.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/StructurePerformanceSuite.java new file mode 100644 index 000000000..ff20b9dbb --- /dev/null +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/StructurePerformanceSuite.java @@ -0,0 +1,86 @@ +/* + * 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 com.baidu.hugegraph.tinkerpop; + +import org.apache.commons.configuration.ConfigurationException; +import org.apache.tinkerpop.gremlin.AbstractGremlinSuite; +import org.apache.tinkerpop.gremlin.GraphManager; +import org.apache.tinkerpop.gremlin.GraphProvider; +import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine; +import org.apache.tinkerpop.gremlin.structure.Graph; +import org.apache.tinkerpop.gremlin.structure.GraphReadPerformanceTest; +import org.apache.tinkerpop.gremlin.structure.GraphWritePerformanceTest; +import org.apache.tinkerpop.gremlin.structure.StructureStandardSuite; +import org.junit.runners.model.InitializationError; +import org.junit.runners.model.RunnerBuilder; +import org.junit.runners.model.Statement; + +import com.baidu.hugegraph.dist.RegisterUtil; + +/** + * The {@code StructurePerformanceSuite} is a JUnit test runner that executes + * the Gremlin Test Suite over a {@link Graph} implementation. This suite + * contains "long-run" tests that produce reports on the read/write + * performance of a providers implementation {@link Graph}. Its usage is + * optional to providers as the tests are somewhat redundant to those found + * elsewhere in other required test suites. + *

+ * For more information on the usage of this suite, + * please see {@link StructureStandardSuite}. + * + * @author Stephen Mallette (http://stephen.genoprime.com) + * @deprecated As of release 3.2.1, replaced by gremlin-benchmark. + */ +@Deprecated +public class StructurePerformanceSuite extends AbstractGremlinSuite { + + /** + * This list of tests in the suite that will be executed. + * Gremlin developers should add to this list + * as needed to enforce tests upon implementations. + */ + private static final Class[] allTests = new Class[]{ + GraphWritePerformanceTest.class, + GraphReadPerformanceTest.class + }; + + public StructurePerformanceSuite(final Class klass, + final RunnerBuilder builder) + throws InitializationError, + ConfigurationException { + super(klass, builder, allTests, null, true, + TraversalEngine.Type.STANDARD); + RegisterUtil.registerBackends(); + } + + @Override + protected Statement withAfterClasses(final Statement statement) { + Statement wrappedStatement = new Statement() { + @Override + public void evaluate() throws Throwable { + statement.evaluate(); + GraphProvider gp = GraphManager.setGraphProvider(null); + ((TestGraphProvider) gp).clearBackends(); + GraphManager.setGraphProvider(gp); + } + }; + return super.withAfterClasses(wrappedStatement); + } +} diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/StructurePerformanceTest.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/StructurePerformanceTest.java new file mode 100644 index 000000000..3c4c6292b --- /dev/null +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/StructurePerformanceTest.java @@ -0,0 +1,29 @@ +/* + * 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 com.baidu.hugegraph.tinkerpop; + +import org.apache.tinkerpop.gremlin.GraphProviderClass; +import org.junit.runner.RunWith; + +@RunWith(StructurePerformanceSuite.class) +@GraphProviderClass(provider = StructureTestGraphProvider.class, + graph = TestGraph.class) +public class StructurePerformanceTest { +} \ No newline at end of file diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/TestGraph.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/TestGraph.java index d9f7fcbad..5b4301afa 100644 --- a/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/TestGraph.java +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/tinkerpop/TestGraph.java @@ -41,6 +41,8 @@ import com.baidu.hugegraph.type.define.IdStrategy; @Graph.OptIn("com.baidu.hugegraph.tinkerpop.StructureBasicSuite") @Graph.OptIn("com.baidu.hugegraph.tinkerpop.ProcessStandardTest") +@Graph.OptIn("com.baidu.hugegraph.tinkerpop.StructurePerformanceTest") +@Graph.OptIn("com.baidu.hugegraph.tinkerpop.ProcessPerformanceTest") public class TestGraph implements Graph { public static final String DEFAULT_VL = "vertex"; diff --git a/hugegraph-test/src/main/resources/fast-methods.filter b/hugegraph-test/src/main/resources/fast-methods.filter index d79eec256..95e6ec401 100644 --- a/hugegraph-test/src/main/resources/fast-methods.filter +++ b/hugegraph-test/src/main/resources/fast-methods.filter @@ -52,6 +52,7 @@ org.apache.tinkerpop.gremlin.algorithm.generator.DistributionGeneratorTest.Diffe ## not bugs org.apache.tinkerpop.gremlin.structure.GraphTest.shouldRemoveVertices: Random UUID as edge label org.apache.tinkerpop.gremlin.structure.GraphTest.shouldRemoveEdges: Random UUID as edge label +org.apache.tinkerpop.gremlin.structure.TransactionTest.shouldExecuteWithCompetingThreads: Hang the tests because property 'test' have both String and long value #################### process suite #################### @@ -131,3 +132,14 @@ org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest.Traversals.g_V org.apache.tinkerpop.gremlin.process.traversal.step.ComplexTest.Traversals.classicRecommendation: long time org.apache.tinkerpop.gremlin.process.traversal.step.ComplexTest.Traversals.playlistPaths: long time org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.TreeTest.Traversals.g_V_out_out_treeXaX_capXaX: long time + +#################### structure performance suite #################### + +org.apache.tinkerpop.gremlin.structure.GraphWritePerformanceTest.WriteToGraph.writeEmptyVertices: Vertices number exceeds 65536, can not delete by vertex label after tests +org.apache.tinkerpop.gremlin.structure.GraphWritePerformanceTest.WriteToGraph.writeEmptyVerticesAndEdges: Vertices number exceeds 65536, can not delete by vertex label after tests +org.apache.tinkerpop.gremlin.structure.GraphReadPerformanceTest.ReadFromGraph.readAllVerticesAndProperties: Vertices number exceeds 65536, can not delete by vertex label after tests +org.apache.tinkerpop.gremlin.structure.GraphReadPerformanceTest.ReadFromGraph.readAllEdgesAndProperties: Vertices number exceeds 65536, can not delete by vertex label after tests + +#################### process performance suite #################### + +org.apache.tinkerpop.gremlin.process.TraversalPerformanceTest.g_E_hasLabelXwrittenByX_whereXinV_inEXsungByX_count_isX0XX_subgraphXsgX: Failed with vertex not exist error after 15 minutes, need more analysis to fix diff --git a/hugegraph-test/src/main/resources/hugegraph.properties b/hugegraph-test/src/main/resources/hugegraph.properties index 033814638..426038ff6 100644 --- a/hugegraph-test/src/main/resources/hugegraph.properties +++ b/hugegraph-test/src/main/resources/hugegraph.properties @@ -12,3 +12,6 @@ cassandra.host=localhost cassandra.port=9042 test.tinkerpop.filter=fast-methods.filter + +vertex.tx_capacity=1000000 +edge.tx_capacity=1000000 \ No newline at end of file diff --git a/hugegraph-test/src/main/resources/methods.filter b/hugegraph-test/src/main/resources/methods.filter index 38ece070f..927cb1bfc 100644 --- a/hugegraph-test/src/main/resources/methods.filter +++ b/hugegraph-test/src/main/resources/methods.filter @@ -52,6 +52,7 @@ org.apache.tinkerpop.gremlin.algorithm.generator.DistributionGeneratorTest.Diffe ## not bugs org.apache.tinkerpop.gremlin.structure.GraphTest.shouldRemoveVertices: Random UUID as edge label org.apache.tinkerpop.gremlin.structure.GraphTest.shouldRemoveEdges: Random UUID as edge label +org.apache.tinkerpop.gremlin.structure.TransactionTest.shouldExecuteWithCompetingThreads: Hang the tests because property 'test' have both String and long value #################### process suite #################### @@ -95,3 +96,14 @@ org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeTest.Traversals.g org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexTest.Traversals.g_addVXpersonX_propertyXname_stephenX_propertyXname_stephenmX: Expect multi properties after setting single property multi times org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexTest.Traversals.g_addVXanimalX_propertyXname_mateoX_propertyXname_gateoX_propertyXname_cateoX_propertyXage_5X: Expect multi properties after setting single property multi times org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexTest.Traversals.g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX: Expect multi properties after setting single property multi times + +#################### structure performance suite #################### + +org.apache.tinkerpop.gremlin.structure.GraphWritePerformanceTest.WriteToGraph.writeEmptyVertices: Vertices number exceeds 65536, can not delete by vertex label after tests +org.apache.tinkerpop.gremlin.structure.GraphWritePerformanceTest.WriteToGraph.writeEmptyVerticesAndEdges: Vertices number exceeds 65536, can not delete by vertex label after tests +org.apache.tinkerpop.gremlin.structure.GraphReadPerformanceTest.ReadFromGraph.readAllVerticesAndProperties: Vertices number exceeds 65536, can not delete by vertex label after tests +org.apache.tinkerpop.gremlin.structure.GraphReadPerformanceTest.ReadFromGraph.readAllEdgesAndProperties: Vertices number exceeds 65536, can not delete by vertex label after tests + +#################### process performance suite #################### + +org.apache.tinkerpop.gremlin.process.TraversalPerformanceTest.g_E_hasLabelXwrittenByX_whereXinV_inEXsungByX_count_isX0XX_subgraphXsgX: Failed with vertex not exist error after 15 minutes, need more analysis to fix