You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/10/30 10:24:15 UTC
[2/9] tinkerpop git commit: TINKERPOP-1235 Removed deprecated
"performance" tests.
TINKERPOP-1235 Removed deprecated "performance" tests.
Also removed dependencies on junit-benchmarks and h2. This will be a breaking change for providers who were using these test suites. Upgrade documentation has been updated with respect to this issue.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/a1dc42d2
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a1dc42d2
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a1dc42d2
Branch: refs/heads/TINKERPOP-1420
Commit: a1dc42d207bb0ca619e80daadeea29b11b679c6c
Parents: e5f2f6d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Oct 25 16:04:21 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Oct 27 10:34:21 2016 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 2 +
.../developer/development-environment.asciidoc | 1 -
docs/src/dev/developer/release.asciidoc | 1 -
docs/src/upgrade/release-3.3.x.asciidoc | 21 +++
.../tinkerpop/gremlin/structure/Graph.java | 18 --
.../loaders/SugarLoaderPerformanceTest.groovy | 138 --------------
.../GroovyEnvironmentPerformanceSuite.java | 88 ---------
.../engine/GremlinExecutorPerformanceTest.java | 189 -------------------
.../AbstractGremlinServerPerformanceTest.java | 100 ----------
.../server/GremlinAdditionPerformanceTest.java | 108 -----------
.../server/GremlinTraversalPerformanceTest.java | 108 -----------
gremlin-test/pom.xml | 10 -
.../process/ProcessPerformanceSuite.java | 57 ------
.../process/TraversalPerformanceTest.java | 133 -------------
.../structure/GraphReadPerformanceTest.java | 120 ------------
.../structure/GraphWritePerformanceTest.java | 128 -------------
.../structure/StructurePerformanceSuite.java | 54 ------
.../gremlin/neo4j/structure/Neo4jGraph.java | 3 -
pom.xml | 37 ----
.../tinkergraph/structure/TinkerGraph.java | 3 -
.../TinkerGraphProcessPerformanceTest.java | 37 ----
.../TinkerGraphStructurePerformanceTest.java | 37 ----
...erGraphGroovyEnvironmentPerformanceTest.java | 39 ----
23 files changed, 23 insertions(+), 1409 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 5c76514..2b9a18d 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,8 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
TinkerPop 3.3.0 (Release Date: NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Removed all performance tests that were not part of `gremlin-benchmark`.
+* Removed dependency on `junit-benchmarks` and it's related reference to `h2`.
* Moved the source for the "home page" into the repository under `/site` so that it easier to accept contributions.
* Replaced term `REST` with `HTTP` to remove any confusion as to the design of the API.
* Moved `gremlin-benchmark` under `gremlin-tools` module.
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/docs/src/dev/developer/development-environment.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/development-environment.asciidoc b/docs/src/dev/developer/development-environment.asciidoc
index a6aeaa2..ff17f00 100644
--- a/docs/src/dev/developer/development-environment.asciidoc
+++ b/docs/src/dev/developer/development-environment.asciidoc
@@ -144,7 +144,6 @@ mvn -Dmaven.javadoc.skip=true --projects tinkergraph-gremlin test
* Integration Tests: `mvn verify -DskipIntegrationTests=false`
** Execute with the `-DincludeNeo4j` option to include transactional tests.
** Execute with the `-DuseEpoll` option to try to use Netty native transport (works on Linux, but will fallback to Java NIO on other OS).
-* Performance Tests: `mvn verify -DskipPerformanceTests=false`
* Benchmarks: `mvn verify -DskipBenchmarks=false`
** Reports are generated to the console and to `gremlin-tools/gremlin-benchmark/target/reports/benchmark`.
* Test coverage report: `mvn clean install -Dcoverage` - note that the `install` is necessary because report aggregation is bound to that part of the lifecycle.
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/docs/src/dev/developer/release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/release.asciidoc b/docs/src/dev/developer/release.asciidoc
index dd7b4a0..eb311cf 100644
--- a/docs/src/dev/developer/release.asciidoc
+++ b/docs/src/dev/developer/release.asciidoc
@@ -106,7 +106,6 @@ might be high.
. `mvn clean install -DincludeNeo4j`
.. `mvn verify -DskipIntegrationTests=false -DincludeNeo4j`
-.. `mvn verify -DskipPerformanceTests=false`
. `bin/publish-docs.sh <username>` - note that under a release candidate the documentation is published as SNAPSHOT
. `mvn versions:set -DnewVersion=xx.yy.zz -DgenerateBackupPoms=false` to update the project files to reference a non-SNAPSHOT version
. `pushd gremlin-console/bin; ln -fs ../target/apache-tinkerpop-gremlin-console-xx.yy.zz-standalone/bin/gremlin.sh gremlin.sh; popd`
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index a026771..6a4496a 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -31,3 +31,24 @@ Please see the link:https://github.com/apache/tinkerpop/blob/3.3.3/CHANGELOG.asc
Upgrading for Users
~~~~~~~~~~~~~~~~~~~
+
+
+Upgrading for Providers
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Graph Database Providers
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Performance Tests
++++++++++++++++++
+
+Performance tests based on `junit-benchmarks` have been removed from TinkerPop. Specifically, providers should be
+concerned with breaking changes related to the removal of:
+
+* `StructurePerformanceSuite`
+* `ProcessPerformanceSuite`
+* `GroovyEnvironmentPerformanceSuite`
+
+Those graph providers who relied on these tests should simply remove them from their respective test suites.
+
+See: https://issues.apache.org/jira/browse/TINKERPOP-1235[TINKERPOP-1235]
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
index ed3f12d..8231961 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
@@ -1200,32 +1200,14 @@ public interface Graph extends AutoCloseable, Host {
public @interface OptIn {
public static String SUITE_STRUCTURE_STANDARD = "org.apache.tinkerpop.gremlin.structure.StructureStandardSuite";
public static String SUITE_STRUCTURE_INTEGRATE = "org.apache.tinkerpop.gremlin.structure.StructureIntegrateSuite";
-
- /**
- * @deprecated As of release 3.2.4, effectively replaced by the gremlin-benchmarks module.
- */
- @Deprecated
- public static String SUITE_STRUCTURE_PERFORMANCE = "org.apache.tinkerpop.gremlin.structure.StructurePerformanceSuite";
public static String SUITE_PROCESS_COMPUTER = "org.apache.tinkerpop.gremlin.process.ProcessComputerSuite";
public static String SUITE_PROCESS_STANDARD = "org.apache.tinkerpop.gremlin.process.ProcessStandardSuite";
-
- /**
- * @deprecated As of release 3.2.4, effectively replaced by the gremlin-benchmarks module.
- */
- @Deprecated
- public static String SUITE_PROCESS_PERFORMANCE = "org.apache.tinkerpop.gremlin.process.ProcessPerformanceSuite";
public static String SUITE_GROOVY_PROCESS_STANDARD = "org.apache.tinkerpop.gremlin.process.GroovyProcessStandardSuite";
public static String SUITE_GROOVY_PROCESS_COMPUTER = "org.apache.tinkerpop.gremlin.process.GroovyProcessComputerSuite";
public static String SUITE_GROOVY_ENVIRONMENT = "org.apache.tinkerpop.gremlin.groovy.GroovyEnvironmentSuite";
public static String SUITE_GROOVY_ENVIRONMENT_INTEGRATE = "org.apache.tinkerpop.gremlin.groovy.GroovyEnvironmentIntegrateSuite";
/**
- * @deprecated As of release 3.2.4, effectively replaced by the gremlin-benchmarks module.
- */
- @Deprecated
- public static String SUITE_GROOVY_ENVIRONMENT_PERFORMANCE = "org.apache.tinkerpop.gremlin.groovy.GroovyEnvironmentPerformanceSuite";
-
- /**
* The test suite class to opt in to.
*/
public String value();
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/loaders/SugarLoaderPerformanceTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/loaders/SugarLoaderPerformanceTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/loaders/SugarLoaderPerformanceTest.groovy
deleted file mode 100644
index 809db18..0000000
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/loaders/SugarLoaderPerformanceTest.groovy
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.groovy.loaders
-
-import com.carrotsearch.junitbenchmarks.BenchmarkOptions
-import com.carrotsearch.junitbenchmarks.BenchmarkRule
-import com.carrotsearch.junitbenchmarks.annotation.AxisRange
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkHistoryChart
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart
-import com.carrotsearch.junitbenchmarks.annotation.LabelType
-import org.apache.tinkerpop.gremlin.AbstractGremlinTest
-import org.apache.tinkerpop.gremlin.LoadGraphWith
-import org.junit.FixMethodOrder
-import org.junit.Rule
-import org.junit.Test
-import org.junit.rules.TestRule
-import org.junit.runners.MethodSorters
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @deprecated As of release 3.2.1, replaced by gremlin-benchmark.
- */
-@AxisRange(min = 0d, max = 1d)
-@BenchmarkMethodChart(filePrefix = "sugar")
-@BenchmarkHistoryChart(labelWith = LabelType.CUSTOM_KEY, maxRuns = 20, filePrefix = "hx-sugar")
-@FixMethodOrder(MethodSorters.JVM)
-@Deprecated
-class SugarLoaderPerformanceTest extends AbstractGremlinTest {
- @Rule
- public TestRule benchmarkRun = new BenchmarkRule()
-
- public final static int DEFAULT_BENCHMARK_ROUNDS = 1000
- public final static int DEFAULT_WARMUP_ROUNDS = 50
-
- static {
- SugarLoader.load()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void java_g_V() throws Exception {
- g.V().iterate()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void groovy_g_V() throws Exception {
- g.V.iterate()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void java_g_V_outE_inV() throws Exception {
- g.V().outE().inV().iterate()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void groovy_g_V_outE_inV() throws Exception {
- g.V.outE.inV.iterate()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void java_g_V_outE_inV_outE_inV() throws Exception {
- g.V().outE().inV().outE().inV().iterate()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void groovy_g_V_outE_inV_outE_inV() throws Exception {
- g.V.outE.inV.outE.inV.iterate()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void java_g_V_name() throws Exception {
- g.V().values("name").iterate()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void groovy_g_V_name() throws Exception {
- g.V.name.iterate()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void java_g_VX1X_name() throws Exception {
- g.V(convertToVertexId("marko")).values("name").iterate()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void groovy_g_VX1X_name() throws Exception {
- g.V(convertToVertexId("marko")).name.iterate()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void java_g_VX1X_outE() throws Exception {
- g.V(convertToVertexId("marko")).outE().iterate()
- }
-
- @BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS, warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
- @Test
- public void groovy_g_VX1X_outE() throws Exception {
- g.V(convertToVertexId("marko")).outE.iterate()
- }
-}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentPerformanceSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentPerformanceSuite.java b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentPerformanceSuite.java
deleted file mode 100644
index d6f62ed..0000000
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentPerformanceSuite.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.groovy;
-
-import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
-import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
-import org.apache.tinkerpop.gremlin.GraphManager;
-import org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutorPerformanceTest;
-import org.apache.tinkerpop.gremlin.groovy.loaders.SugarLoader;
-import org.apache.tinkerpop.gremlin.groovy.loaders.SugarLoaderPerformanceTest;
-import org.apache.tinkerpop.gremlin.groovy.util.SugarTestHelper;
-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 java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-/**
- * The {@code GroovyEnvironmentPerformanceSuite} is a JUnit test runner that executes the Gremlin Test Suite over a
- * {@link Graph} implementation. This test suite covers ensures that a vendor implementation is compliant with
- * the Groovy "environment" which will typically ensure that the {@link Graph} will work as expected in the Gremlin
- * Console, Gremlin Server, and other Groovy environments.
- * <p/>
- * Note that this suite contains "long-run" tests. At this time, this suite can be considered optional to providers
- * as the functionality that it provides is generally covered elsewhere.
- * <p/>
- * 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 GroovyEnvironmentPerformanceSuite 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<?>[]{
- GremlinExecutorPerformanceTest.class,
- SugarLoaderPerformanceTest.class
- };
-
- public GroovyEnvironmentPerformanceSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
- super(klass, builder, allTests, null, false, TraversalEngine.Type.STANDARD);
- }
-
- @Override
- public boolean beforeTestExecution(final Class<? extends AbstractGremlinTest> testClass) {
- unloadSugar();
- SugarLoader.load();
- return true;
- }
-
- @Override
- public void afterTestExecution(final Class<? extends AbstractGremlinTest> testClass) {
- unloadSugar();
- }
-
- private void unloadSugar() {
- try {
- SugarTestHelper.clearRegistry(GraphManager.getGraphProvider());
- } catch (Exception ex) {
- throw new RuntimeException(ex);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorPerformanceTest.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorPerformanceTest.java b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorPerformanceTest.java
deleted file mode 100644
index c8517fb..0000000
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorPerformanceTest.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.groovy.engine;
-
-import com.carrotsearch.junitbenchmarks.BenchmarkOptions;
-import com.carrotsearch.junitbenchmarks.BenchmarkRule;
-import com.carrotsearch.junitbenchmarks.annotation.AxisRange;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkHistoryChart;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart;
-import com.carrotsearch.junitbenchmarks.annotation.LabelType;
-import org.apache.commons.configuration.Configuration;
-import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
-import org.apache.tinkerpop.gremlin.LoadGraphWith;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.process.traversal.P;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TestName;
-import org.junit.rules.TestRule;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-import java.util.concurrent.CompletableFuture;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @deprecated As of release 3.2.1, replaced by gremlin-benchmark.
- */
-@AxisRange(min = 0, max = 1)
-@BenchmarkMethodChart(filePrefix = "gremlin-executor")
-@BenchmarkHistoryChart(labelWith = LabelType.CUSTOM_KEY, maxRuns = 20, filePrefix = "hx-gremlin-executor")
-@Deprecated
-public class GremlinExecutorPerformanceTest extends AbstractGremlinTest {
-
- private static final Random rand = new Random(9585834534l);
- private static final GremlinExecutor gremlinExecutor = GremlinExecutor.build().create();
- private GremlinGenerator generator;
- private Graph syntaxGraph = null;
- private Configuration syntaxGraphConfig = null;
-
- @Rule
- public TestRule benchmarkRun = new BenchmarkRule();
-
- @Rule
- public TestName testName = new TestName();
-
- public final static int DEFAULT_BENCHMARK_ROUNDS = 500;
- public final static int DEFAULT_WARMUP_ROUNDS = 10;
-
- @Override
- public void setup() throws Exception {
- super.setup();
- syntaxGraphConfig = graphProvider.newGraphConfiguration("gremlin-executor-test",
- GremlinExecutorPerformanceTest.class, testName.getMethodName(), null);
- syntaxGraph = graphProvider.openTestGraph(syntaxGraphConfig);
- generator = new GremlinGenerator(syntaxGraph, rand);
- }
-
- @Override
- public void tearDown() throws Exception {
- if (syntaxGraph != null) graphProvider.clear(syntaxGraph, syntaxGraphConfig);
- super.tearDown();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void executorEval() throws Exception {
- final Map<String, Object> params = new HashMap<>();
- params.put("g", g);
-
- final String traversal = generator.generateGremlin();
- final int resultsToNextOut = rand.nextInt(512) + 1;
- final String nextedTraversal = traversal + ".next(" + resultsToNextOut + ")";
- final CompletableFuture<Object> future1 = gremlinExecutor.eval(nextedTraversal, params);
- future1.join();
- }
-
- public static class GremlinGenerator {
- private final Random rand;
-
- private final Graph syntaxGraph;
-
- public GremlinGenerator(final Graph syntaxGraph, final Random rand) {
- this.rand = rand;
- this.syntaxGraph = syntaxGraph;
- loadGraph(this.syntaxGraph);
- }
-
- public String generateGremlin() {
- final int targetStepCount = rand.nextInt(10);
- final StringBuilder sb = new StringBuilder("g.V()");
- final Vertex start = syntaxGraph.traversal().V().has("starter", true).order().by(this::shuffle).next();
- sb.append((String) start.value("step"));
-
- syntaxGraph.traversal().V(start).times(targetStepCount - 1).repeat(
- __.local(__.outE().has("weight", P.gte(rand.nextDouble()))
- .inV().order().by(this::shuffle).limit(1)).sideEffect(t -> sb.append((String) t.get().value("step")))
- ).iterate();
-
- return sb.toString();
- }
-
- private int shuffle(final Object o1, final Object o2) {
- return rand.nextBoolean() ? -1 : 1;
- }
-
- private static void loadGraph(final Graph syntaxGraph) {
- final Vertex vOutStep = syntaxGraph.addVertex("step", ".out()", "starter", true);
- final Vertex vInStep = syntaxGraph.addVertex("step", ".in()", "starter", true);
- final Vertex vBothStep = syntaxGraph.addVertex("step", ".both()", "starter", true);
- final Vertex vInEStep = syntaxGraph.addVertex("step", ".inE()", "starter", true);
- final Vertex vOutEStep = syntaxGraph.addVertex("step", ".outE()", "starter", true);
- final Vertex vBothEStep = syntaxGraph.addVertex("step", ".bothE()", "starter", true);
- final Vertex vInVStep = syntaxGraph.addVertex("step", ".inV()", "starter", false);
- final Vertex vOutVStep = syntaxGraph.addVertex("step", ".outV()", "starter", false);
- final Vertex vOtherVStep = syntaxGraph.addVertex("step", ".otherV()", "starter", false);
-
- vOutStep.addEdge("followedBy", vOutStep, "weight", 1.0d);
- vOutStep.addEdge("followedBy", vInStep, "weight", 0.15d);
- vOutStep.addEdge("followedBy", vBothStep, "weight", 0.15d);
- vOutStep.addEdge("followedBy", vOutEStep, "weight", 0.75d);
- vOutStep.addEdge("followedBy", vInEStep, "weight", 0.1d);
- vOutStep.addEdge("followedBy", vBothEStep, "weight", 0.1d);
-
- vInStep.addEdge("followedBy", vOutStep, "weight", 0.15d);
- vInStep.addEdge("followedBy", vInStep, "weight", 1.0d);
- vInStep.addEdge("followedBy", vBothStep, "weight", 0.15d);
- vInStep.addEdge("followedBy", vOutEStep, "weight", 0.1d);
- vInStep.addEdge("followedBy", vInEStep, "weight", 0.75d);
- vInStep.addEdge("followedBy", vBothEStep, "weight", 0.1d);
-
- vOtherVStep.addEdge("followedBy", vOutStep, "weight", 0.15d);
- vOtherVStep.addEdge("followedBy", vInStep, "weight", 1.0d);
- vOtherVStep.addEdge("followedBy", vBothStep, "weight", 0.15d);
- vOtherVStep.addEdge("followedBy", vOutEStep, "weight", 0.1d);
- vOtherVStep.addEdge("followedBy", vInEStep, "weight", 0.75d);
- vOtherVStep.addEdge("followedBy", vBothEStep, "weight", 0.1d);
-
- vBothStep.addEdge("followedBy", vOutStep, "weight", 1.0d);
- vBothStep.addEdge("followedBy", vInStep, "weight", 1.0d);
- vBothStep.addEdge("followedBy", vBothStep, "weight", 0.1d);
- vBothStep.addEdge("followedBy", vOutEStep, "weight", 0.15d);
- vBothStep.addEdge("followedBy", vInEStep, "weight", 0.15d);
- vBothStep.addEdge("followedBy", vBothEStep, "weight", 0.1d);
-
- vInEStep.addEdge("followedBy", vOutVStep, "weight", 1.0d);
- vInEStep.addEdge("followedBy", vInVStep, "weight", 0.1d);
-
- vOutEStep.addEdge("followedBy", vInVStep, "weight", 1.0d);
- vInEStep.addEdge("followedBy", vOutVStep, "weight", 0.1d);
-
- vBothEStep.addEdge("followedBy", vOtherVStep, "weight", 1.0d);
-
- vInVStep.addEdge("followedBy", vOutStep, "weight", 1.0d);
- vInVStep.addEdge("followedBy", vInStep, "weight", 0.25d);
- vInVStep.addEdge("followedBy", vBothStep, "weight", 0.1d);
- vInVStep.addEdge("followedBy", vOutEStep, "weight", 1.0d);
- vInVStep.addEdge("followedBy", vInEStep, "weight", 0.25d);
- vInVStep.addEdge("followedBy", vBothEStep, "weight", 0.1d);
-
- vOutVStep.addEdge("followedBy", vOutStep, "weight", 0.25d);
- vOutVStep.addEdge("followedBy", vInStep, "weight", 1.0d);
- vOutVStep.addEdge("followedBy", vBothStep, "weight", 0.1d);
- vOutVStep.addEdge("followedBy", vOutEStep, "weight", 0.25d);
- vOutVStep.addEdge("followedBy", vInEStep, "weight", 1.0d);
- vOutVStep.addEdge("followedBy", vBothEStep, "weight", 0.1d);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/AbstractGremlinServerPerformanceTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/AbstractGremlinServerPerformanceTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/AbstractGremlinServerPerformanceTest.java
deleted file mode 100644
index 7808c7e..0000000
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/AbstractGremlinServerPerformanceTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.server;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.InputStream;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.CountDownLatch;
-
-/**
- * Starts and stops one instance for all tests that extend from this class.
- *
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @deprecated As of release 3.2.1, replaced by gremlin-benchmark.
- */
-@Deprecated
-public abstract class AbstractGremlinServerPerformanceTest {
- private static final Logger logger = LoggerFactory.getLogger(AbstractGremlinServerPerformanceTest.class);
-
- private static String host;
- private static String port;
-
- private static CountDownLatch latchWaitForTestsToComplete = new CountDownLatch(1);
-
- @BeforeClass
- public static void setUp() throws Exception {
- final InputStream stream = AbstractGremlinServerPerformanceTest.class.getResourceAsStream("gremlin-server-performance.yaml");
- final Settings settings = Settings.read(stream);
- ServerTestHelper.rewritePathsInGremlinServerSettings(settings);
- final CompletableFuture<Void> serverReadyFuture = new CompletableFuture<>();
-
- new Thread(() -> {
- GremlinServer gremlinServer = null;
- try {
- gremlinServer = new GremlinServer(settings);
- gremlinServer.start().join();
-
- // the server was started and is ready for tests
- serverReadyFuture.complete(null);
-
- logger.info("Waiting for performance tests to complete...");
- latchWaitForTestsToComplete.await();
- } catch (InterruptedException ie) {
- logger.info("Shutting down Gremlin Server");
- } catch (Exception ex) {
- logger.error("Could not start Gremlin Server for performance tests.", ex);
- } finally {
- logger.info("Tests are complete - prepare to stop Gremlin Server.");
- // reset the wait at this point
- latchWaitForTestsToComplete = new CountDownLatch(1);
- try {
- if (gremlinServer != null) gremlinServer.stop().join();
- } catch (Exception ex) {
- logger.error("Could not stop Gremlin Server for performance tests", ex);
- }
- }
- }, "performance-test-server-startup").start();
-
- // block until gremlin server gets off the ground
- logger.info("Performance test waiting for server to start up");
- serverReadyFuture.join();
- logger.info("Gremlin Server is started and ready for performance test to execute");
-
- host = System.getProperty("host", "localhost");
- port = System.getProperty("port", "8182");
- }
-
- @AfterClass
- public static void tearDown() throws Exception {
- latchWaitForTestsToComplete.countDown();
- }
-
- protected static String getHostPort() {
- return host + ":" + port;
- }
-
- protected static String getWebSocketBaseUri() {
- return "ws://" + getHostPort() + "/gremlin";
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinAdditionPerformanceTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinAdditionPerformanceTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinAdditionPerformanceTest.java
deleted file mode 100644
index d2d9d97..0000000
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinAdditionPerformanceTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.server;
-
-import com.carrotsearch.junitbenchmarks.BenchmarkOptions;
-import com.carrotsearch.junitbenchmarks.BenchmarkRule;
-import com.carrotsearch.junitbenchmarks.annotation.AxisRange;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkHistoryChart;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart;
-import com.carrotsearch.junitbenchmarks.annotation.LabelType;
-import org.apache.tinkerpop.gremlin.driver.Client;
-import org.apache.tinkerpop.gremlin.driver.Cluster;
-import org.apache.tinkerpop.gremlin.driver.Result;
-import org.apache.tinkerpop.gremlin.driver.ser.Serializers;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TestRule;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Random;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * Execute a simple script (1+1).
- *
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @deprecated As of release 3.2.1, replaced by gremlin-benchmark.
- */
-@Deprecated
-@AxisRange(min = 0, max = 1)
-@BenchmarkMethodChart(filePrefix = "gremlin-addition")
-@BenchmarkHistoryChart(labelWith = LabelType.CUSTOM_KEY, maxRuns = 20, filePrefix = "hx-gremlin-addition")
-public class GremlinAdditionPerformanceTest extends AbstractGremlinServerPerformanceTest {
- private static final Logger logger = LoggerFactory.getLogger(GremlinAdditionPerformanceTest.class);
-
- public final static int DEFAULT_BENCHMARK_ROUNDS = 50;
- public final static int DEFAULT_WARMUP_ROUNDS = 5;
-
- public final static int DEFAULT_CONCURRENT_BENCHMARK_ROUNDS = 500;
- public final static int DEFAULT_CONCURRENT_WARMUP_ROUNDS = 10;
-
- private final static Cluster cluster = Cluster.build("localhost").create();
- private final static Random rand = new Random();
-
- @Rule
- public TestRule benchmarkRun = new BenchmarkRule();
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @Test
- public void webSocketsGremlin() throws Exception {
- tryWebSocketGremlin();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_CONCURRENT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_CONCURRENT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_AVAILABLE_CORES)
- @Test
- public void webSocketsGremlinConcurrent() throws Exception {
- tryWebSocketGremlin();
- }
-
- @BenchmarkOptions(benchmarkRounds = 20, warmupRounds = 1, concurrency = BenchmarkOptions.CONCURRENCY_AVAILABLE_CORES)
- @Test
- public void webSocketsGremlinConcurrentAlternateSerialization() throws Exception {
- final Serializers[] mimes = new Serializers[]{Serializers.GRAPHSON, Serializers.GRAPHSON_V1D0, Serializers.GRYO_V1D0};
- final Serializers mimeType = mimes[rand.nextInt(3)];
- logger.info(mimeType.toString());
- final Cluster cluster = Cluster.build("localhost")
- .serializer(mimeType)
- .create();
- final Client client = cluster.connect();
- assertEquals("2", client.submit("1+1").stream().map(Result::getString).findAny().orElse("invalid"));
- }
-
- @BeforeClass
- public static void before() {
- // good to call init here ahead of performance tracking
- cluster.init();
- }
-
- @AfterClass
- public static void after() {
- cluster.close();
- }
-
- private void tryWebSocketGremlin() throws Exception {
- final Client client = cluster.connect();
- assertEquals("2", client.submit("1+1").stream().map(Result::getString).findAny().orElse("invalid"));
- }
-}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinTraversalPerformanceTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinTraversalPerformanceTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinTraversalPerformanceTest.java
deleted file mode 100644
index 9a80edd..0000000
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinTraversalPerformanceTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.server;
-
-import com.carrotsearch.junitbenchmarks.BenchmarkOptions;
-import com.carrotsearch.junitbenchmarks.BenchmarkRule;
-import com.carrotsearch.junitbenchmarks.annotation.AxisRange;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkHistoryChart;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart;
-import com.carrotsearch.junitbenchmarks.annotation.LabelType;
-import org.apache.tinkerpop.gremlin.driver.Client;
-import org.apache.tinkerpop.gremlin.driver.Cluster;
-import org.apache.tinkerpop.gremlin.driver.ResultSet;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TestRule;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.atomic.AtomicReference;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * Uses a single client across multiple threads to issue requests against the server.
- *
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @deprecated As of release 3.2.1, replaced by gremlin-benchmark.
- */
-@Deprecated
-@AxisRange(min = 0, max = 1)
-@BenchmarkMethodChart(filePrefix = "gremlin-traversal")
-@BenchmarkHistoryChart(labelWith = LabelType.CUSTOM_KEY, maxRuns = 20, filePrefix = "hx-gremlin-traversal")
-public class GremlinTraversalPerformanceTest extends AbstractGremlinServerPerformanceTest {
-
- public final static int DEFAULT_BENCHMARK_ROUNDS = 50;
- public final static int DEFAULT_WARMUP_ROUNDS = 5;
-
- public final static int DEFAULT_CONCURRENT_BENCHMARK_ROUNDS = 500;
- public final static int DEFAULT_CONCURRENT_WARMUP_ROUNDS = 10;
-
- private final static Cluster cluster = Cluster.build("localhost").maxConnectionPoolSize(32).maxWaitForConnection(30000).create();
- private final static AtomicReference<Client> client = new AtomicReference<>();
-
- @Rule
- public TestRule benchmarkRun = new BenchmarkRule();
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @Test
- public void webSocketsGremlin() throws Exception {
- tryWebSocketGremlin();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_CONCURRENT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_CONCURRENT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_AVAILABLE_CORES)
- @Test
- public void webSocketsGremlinConcurrent() throws Exception {
- tryWebSocketGremlin();
- }
-
- @BeforeClass
- public static void before() {
- // good to call init here ahead of performance tracking
- cluster.init();
- client.compareAndSet(null, cluster.connect());
- }
-
- @AfterClass
- public static void after() {
- cluster.close();
- }
-
- private void tryWebSocketGremlin() throws Exception {
- final Map<String, Object> params = new HashMap<>();
- params.put("x", 16384l);
-
- final CompletableFuture<ResultSet> future1 = client.get().submitAsync("g.V(x).out().out().next(512)", params);
- final CompletableFuture<ResultSet> future2 = client.get().submitAsync("g.V(x).out().next(7)", params);
- final CompletableFuture<ResultSet> future3 = client.get().submitAsync("g.V(16384l).out().out().next(10)");
- final CompletableFuture<ResultSet> future4 = client.get().submitAsync("g.V(16432l).out().out().next(10)");
- final CompletableFuture<ResultSet> future5 = client.get().submitAsync("g.V(14l).out().next(1)");
-
- assertEquals(512, future1.get().stream().count());
- assertEquals(7, future2.get().stream().count());
- assertEquals(10, future3.get().stream().count());
- assertEquals(10, future4.get().stream().count());
- assertEquals(1, future5.get().stream().count());
- }
-}
-
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-test/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-test/pom.xml b/gremlin-test/pom.xml
index 76c4d4b..f316188 100644
--- a/gremlin-test/pom.xml
+++ b/gremlin-test/pom.xml
@@ -32,16 +32,6 @@ limitations under the License.
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>com.carrotsearch</groupId>
- <artifactId>junit-benchmarks</artifactId>
- <version>0.7.2</version>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <version>1.3.171</version>
- </dependency>
- <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessPerformanceSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessPerformanceSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessPerformanceSuite.java
deleted file mode 100644
index 3d2b331..0000000
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessPerformanceSuite.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.process;
-
-import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
-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;
-
-/**
- * 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.
- * <p/>
- * 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 {
- super(klass, builder, allTests, null, true, TraversalEngine.Type.STANDARD);
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/TraversalPerformanceTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/TraversalPerformanceTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/TraversalPerformanceTest.java
deleted file mode 100644
index c00fadc..0000000
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/TraversalPerformanceTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.process;
-
-import com.carrotsearch.junitbenchmarks.BenchmarkOptions;
-import com.carrotsearch.junitbenchmarks.BenchmarkRule;
-import com.carrotsearch.junitbenchmarks.annotation.AxisRange;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkHistoryChart;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart;
-import com.carrotsearch.junitbenchmarks.annotation.LabelType;
-import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
-import org.apache.tinkerpop.gremlin.LoadGraphWith;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TestRule;
-
-import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.out;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @author Daniel Kuppitz (http://gremlin.guru)
- *
- * @deprecated As of release 3.2.0, replaced by gremlin-benchmark.
- */
-@AxisRange(min = 0, max = 1)
-@BenchmarkMethodChart(filePrefix = "gremlin-traversal")
-@BenchmarkHistoryChart(labelWith = LabelType.CUSTOM_KEY, maxRuns = 20, filePrefix = "hx-gremlin-traversal")
-@Deprecated
-public class TraversalPerformanceTest extends AbstractGremlinTest {
-
- public final static int DEFAULT_BENCHMARK_ROUNDS = 10;
- public final static int DEFAULT_WARMUP_ROUNDS = 5;
-
- @Rule
- public TestRule benchmarkRun = new BenchmarkRule();
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void g_V_outE_inV_outE_inV_outE_inV() throws Exception {
- g.V().outE().inV().outE().inV().outE().inV().iterate();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void g_V_out_out_out() throws Exception {
- g.V().out().out().out().iterate();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void g_V_out_out_out_path() throws Exception {
- g.V().out().out().out().path().iterate();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void g_V_repeatXoutX_timesX2X() throws Exception {
- g.V().repeat(out()).times(2).iterate();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void g_V_repeatXoutX_timesX3X() throws Exception {
- g.V().repeat(out()).times(3).iterate();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void g_V_localXout_out_valuesXnameX_foldX() throws Exception {
- g.V().local(out().out().values("name").fold()).iterate();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void g_V_out_localXout_out_valuesXnameX_foldX() throws Exception {
- g.V().out().local(out().out().values("name").fold()).iterate();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void g_V_out_mapXout_out_valuesXnameX_toListX() throws Exception {
- g.V().out().map(v -> g.V(v.get()).out().out().values("name").toList()).iterate();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void g_V_label_groupCount() throws Exception {
- g.V().label().groupCount().iterate();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void g_V_match_selectXbX_valuesXnameX() throws Exception {
- g.V().match(
- __.as("a").has("name", "Garcia"),
- __.as("a").in("writtenBy").as("b"),
- __.as("a").in("sungBy").as("b")).select("b").values("name").iterate();
- }
-
- @BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @Test
- public void g_E_hasLabelXwrittenByX_whereXinV_inEXsungByX_count_isX0XX_subgraphXsgX() throws Exception {
- g.E().hasLabel("writtenBy").where(__.inV().inE("sungBy").count().is(0)).subgraph("sg").iterate();
- }
-}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphReadPerformanceTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphReadPerformanceTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphReadPerformanceTest.java
deleted file mode 100644
index 3bf3a1e..0000000
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphReadPerformanceTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.structure;
-
-import com.carrotsearch.junitbenchmarks.BenchmarkOptions;
-import com.carrotsearch.junitbenchmarks.BenchmarkRule;
-import com.carrotsearch.junitbenchmarks.annotation.AxisRange;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkHistoryChart;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart;
-import com.carrotsearch.junitbenchmarks.annotation.LabelType;
-import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
-import org.apache.tinkerpop.gremlin.algorithm.generator.Distribution;
-import org.apache.tinkerpop.gremlin.algorithm.generator.DistributionGenerator;
-import org.apache.tinkerpop.gremlin.algorithm.generator.PowerLawDistribution;
-import org.apache.commons.lang.RandomStringUtils;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.runners.Enclosed;
-import org.junit.rules.TestRule;
-import org.junit.runner.RunWith;
-
-import java.util.HashSet;
-import java.util.Random;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @deprecated As of release 3.2.1, replaced by gremlin-benchmark.
- */
-@RunWith(Enclosed.class)
-@Deprecated
-public class GraphReadPerformanceTest {
- @AxisRange(min = 0, max = 1)
- @BenchmarkMethodChart(filePrefix = "gremlin-read")
- @BenchmarkHistoryChart(labelWith = LabelType.CUSTOM_KEY, maxRuns = 20, filePrefix = "hx-gremlin-read")
- public static class ReadFromGraph extends AbstractGremlinTest {
-
- @Rule
- public TestRule benchmarkRun = new BenchmarkRule();
-
- private Set<Object> ids = new HashSet<>();
- private int edgeCount = 0;
-
- @Override
- protected void afterLoadGraphWith(final Graph g) throws Exception {
- ids.clear();
- final int numVertices = 10000;
- final Random r = new Random(854939487556l);
- for (int i = 0; i < numVertices; i++) {
- final Vertex v = g.addVertex("oid", i, "name", RandomStringUtils.randomAlphabetic(r.nextInt(1024)));
- ids.add(v.id());
- }
-
- final Distribution inDist = new PowerLawDistribution(2.3);
- final Distribution outDist = new PowerLawDistribution(2.8);
- final DistributionGenerator generator = DistributionGenerator.build(g)
- .label("knows")
- .seedGenerator(r::nextLong)
- .outDistribution(outDist)
- .inDistribution(inDist)
- .edgeProcessor(e -> e.<Double>property("weight", r.nextDouble()))
- .expectedNumEdges(numVertices * 3).create();
- edgeCount = generator.generate();
- }
-
- @Test
- @BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- public void readAllVerticesAndProperties() throws Exception {
- final AtomicInteger counter = new AtomicInteger(0);
-
- // read the vertices 10 times over
- for (int ix = 0; ix < 10; ix++) {
- graph.vertices().forEachRemaining(vertex -> {
- assertNotNull(vertex.value("name"));
- counter.incrementAndGet();
- });
-
- assertEquals(10000, counter.get());
- counter.set(0);
- }
- }
-
- @Test
- @BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- public void readAllEdgesAndProperties() throws Exception {
- final AtomicInteger counter = new AtomicInteger(0);
-
- // read the vertices 10 times over
- for (int ix = 0; ix < 10; ix++) {
- graph.edges().forEachRemaining(edge -> {
- assertNotNull(edge.value("weight"));
- counter.incrementAndGet();
- });
-
- assertEquals(edgeCount, counter.get());
- counter.set(0);
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphWritePerformanceTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphWritePerformanceTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphWritePerformanceTest.java
deleted file mode 100644
index c541cdb..0000000
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphWritePerformanceTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.structure;
-
-import com.carrotsearch.junitbenchmarks.BenchmarkOptions;
-import com.carrotsearch.junitbenchmarks.BenchmarkRule;
-import com.carrotsearch.junitbenchmarks.annotation.AxisRange;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkHistoryChart;
-import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart;
-import com.carrotsearch.junitbenchmarks.annotation.LabelType;
-import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
-import org.apache.tinkerpop.gremlin.LoadGraphWith;
-import org.apache.tinkerpop.gremlin.structure.io.GraphWriter;
-import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLIo;
-import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONIo;
-import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.runners.Enclosed;
-import org.junit.rules.TestRule;
-import org.junit.runner.RunWith;
-
-import java.io.ByteArrayOutputStream;
-import java.io.OutputStream;
-import java.util.Optional;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @deprecated As of release 3.2.1, replaced by gremlin-benchmark.
- */
-@RunWith(Enclosed.class)
-@Deprecated
-public class GraphWritePerformanceTest {
-
- @AxisRange(min = 0, max = 1)
- @BenchmarkMethodChart(filePrefix = "structure-write")
- @BenchmarkHistoryChart(labelWith = LabelType.CUSTOM_KEY, maxRuns = 20, filePrefix = "hx-structure-write")
- public static class WriteToGraph extends AbstractGremlinTest {
-
- @Rule
- public TestRule benchmarkRun = new BenchmarkRule();
-
- @Test
- @BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- public void writeEmptyVertices() throws Exception {
- final int verticesToGenerate = 100000;
- for (int ix = 0; ix < verticesToGenerate; ix++) {
- graph.addVertex();
- tryBatchCommit(graph, ix);
- }
-
- assertVertexEdgeCounts(graph, verticesToGenerate, 0);
- }
-
- @Test
- @BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- public void writeEmptyVerticesAndEdges() throws Exception {
- final int verticesToGenerate = 100000;
- Optional<Vertex> lastVertex = Optional.empty();
- for (int ix = 0; ix < verticesToGenerate; ix++) {
- final Vertex v = graph.addVertex();
- if (lastVertex.isPresent())
- v.addEdge("parent", lastVertex.get());
-
- lastVertex = Optional.of(v);
- tryBatchCommit(graph, ix);
- }
-
- assertVertexEdgeCounts(graph, verticesToGenerate, verticesToGenerate - 1);
- }
- }
-
- @AxisRange(min = 0, max = 1)
- @BenchmarkMethodChart(filePrefix = "io-write")
- @BenchmarkHistoryChart(labelWith = LabelType.CUSTOM_KEY, maxRuns = 20, filePrefix = "hx-io-write")
- public static class WriteToIO extends AbstractGremlinTest {
- @Rule
- public TestRule benchmarkRun = new BenchmarkRule();
-
- @Test
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- public void writeGryo() throws Exception {
- final GraphWriter writer = graph.io(GryoIo.build()).writer().create();
- final OutputStream os = new ByteArrayOutputStream();
- writer.writeGraph(os, graph);
- }
-
- @Test
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- public void writeGraphML() throws Exception {
- final GraphWriter writer = graph.io(GraphMLIo.build()).writer().create();
- final OutputStream os = new ByteArrayOutputStream();
- writer.writeGraph(os, graph);
- }
-
- @Test
- @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
- @BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
- public void writeGraphSON() throws Exception {
- final GraphWriter writer = graph.io(GraphSONIo.build()).writer().create();
- final OutputStream os = new ByteArrayOutputStream();
- writer.writeGraph(os, graph);
- }
- }
-
- private static void tryBatchCommit(final Graph g, int ix) {
- if (g.features().graph().supportsTransactions() && ix % 1000 == 0)
- g.tx().commit();
- }
-}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructurePerformanceSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructurePerformanceSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructurePerformanceSuite.java
deleted file mode 100644
index 1dbd4b9..0000000
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructurePerformanceSuite.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.structure;
-
-import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
-import org.junit.runners.model.InitializationError;
-import org.junit.runners.model.RunnerBuilder;
-
-/**
- * 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.
- * <p/>
- * 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 {
- super(klass, builder, allTests, null, false, TraversalEngine.Type.STANDARD);
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
index d5460c7..d4327d1 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
@@ -63,13 +63,10 @@ import java.util.stream.Stream;
*/
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_INTEGRATE)
-@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_PERFORMANCE)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
-@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_PERFORMANCE)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_PROCESS_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_INTEGRATE)
-@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_PERFORMANCE)
@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.NativeNeo4jSuite")
@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.Neo4jStrategySuite")
public final class Neo4jGraph implements Graph, WrappedGraph<Neo4jGraphAPI> {
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9357836..8199586 100644
--- a/pom.xml
+++ b/pom.xml
@@ -139,7 +139,6 @@ limitations under the License.
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<skipIntegrationTests>true</skipIntegrationTests>
- <skipPerformanceTests>true</skipPerformanceTests>
<slf4j.version>1.7.21</slf4j.version>
<hadoop.version>2.7.2</hadoop.version>
<java.tuples.version>1.2</java.tuples.version>
@@ -354,7 +353,6 @@ limitations under the License.
</argLine>
<excludes>
<exclude>**/*IntegrateTest.java</exclude>
- <exclude>**/*PerformanceTest.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -374,32 +372,12 @@ limitations under the License.
</includes>
<skipTests>${skipIntegrationTests}</skipTests>
<argLine>-Dlog4j.configuration=${log4j-test.properties} -Dhost=localhost -Dport=8182
- -Djub.consumers=CONSOLE,H2 -Djub.db.file=target/performance/h2/benchmarks
- -Djub.charts.dir=target/performance/charts -Djub.customkey=${project.parent.version}
-Dbuild.dir=${project.build.directory} -Dis.testing=true
</argLine>
<summaryFile>target/failsafe-reports/failsafe-integration.xml</summaryFile>
</configuration>
</execution>
<execution>
- <id>performance-test</id>
- <goals>
- <goal>integration-test</goal>
- </goals>
- <configuration>
- <includes>
- <include>**/*PerformanceTest.java</include>
- </includes>
- <skipTests>${skipPerformanceTests}</skipTests>
- <argLine>-Dlog4j.configuration=${log4j-test.properties} -Dhost=localhost -Dport=8182
- -Djub.consumers=CONSOLE,H2 -Djub.db.file=target/performance/h2/benchmarks
- -Djub.charts.dir=target/performance/charts -Djub.customkey=${project.parent.version}
- -Dbuild.dir=${project.build.directory}
- </argLine>
- <summaryFile>target/failsafe-reports/failsafe-performance.xml</summaryFile>
- </configuration>
- </execution>
- <execution>
<id>verify-integration-test</id>
<goals>
<goal>verify</goal>
@@ -411,18 +389,6 @@ limitations under the License.
</summaryFiles>
</configuration>
</execution>
- <execution>
- <id>verify-performance-test</id>
- <goals>
- <goal>verify</goal>
- </goals>
- <configuration>
- <skipTests>${skipPerformanceTests}</skipTests>
- <summaryFiles>
- <summaryFile>target/failsafe-reports/failsafe-performance.xml</summaryFile>
- </summaryFiles>
- </configuration>
- </execution>
</executions>
</plugin>
<plugin>
@@ -1158,7 +1124,6 @@ limitations under the License.
</argLine>
<excludes>
<exclude>**/*IntegrateTest.java</exclude>
- <exclude>**/*PerformanceTest.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -1260,8 +1225,6 @@ limitations under the License.
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<argLine>-Dlog4j.configuration=${log4j-test.properties} -Dhost=localhost -Dport=8182
- -Djub.consumers=CONSOLE,H2 -Djub.db.file=target/performance/h2/benchmarks
- -Djub.charts.dir=target/performance/charts -Djub.customkey=${project.parent.version}
-Dbuild.dir=${project.build.directory} -Dis.testing=true ${failsafeArgLine}
</argLine>
</configuration>
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
index dba3467..a1044ee 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
@@ -60,15 +60,12 @@ import java.util.stream.Stream;
*/
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_INTEGRATE)
-@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_PERFORMANCE)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_COMPUTER)
-@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_PERFORMANCE)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_PROCESS_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_PROCESS_COMPUTER)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_INTEGRATE)
-@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_PERFORMANCE)
@Graph.OptIn("org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.strategy.TinkerGraphStrategySuite")
public final class TinkerGraph implements Graph {
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessPerformanceTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessPerformanceTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessPerformanceTest.java
deleted file mode 100644
index 2d72100..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessPerformanceTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.tinkergraph.process;
-
-import org.apache.tinkerpop.gremlin.GraphProviderClass;
-import org.apache.tinkerpop.gremlin.process.ProcessPerformanceSuite;
-import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
-import org.junit.runner.RunWith;
-
-/**
- * Executes the Performance Gremlin Process Test Suite using TinkerGraph.
- *
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @deprecated As of release 3.2.1, replaced by gremlin-benchmark.
- */
-@RunWith(ProcessPerformanceSuite.class)
-@GraphProviderClass(provider = TinkerGraphProvider.class, graph = TinkerGraph.class)
-@Deprecated
-public class TinkerGraphProcessPerformanceTest {
-}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphStructurePerformanceTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphStructurePerformanceTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphStructurePerformanceTest.java
deleted file mode 100644
index f6b8763..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphStructurePerformanceTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.tinkergraph.structure;
-
-import org.apache.tinkerpop.gremlin.GraphProviderClass;
-import org.apache.tinkerpop.gremlin.structure.StructurePerformanceSuite;
-import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
-import org.junit.runner.RunWith;
-
-/**
- * Executes the Gremlin Structure Performance Test Suite using TinkerGraph.
- *
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @deprecated As of release 3.2.1, replaced by gremlin-benchmark.
- */
-@RunWith(StructurePerformanceSuite.class)
-@GraphProviderClass(provider = TinkerGraphProvider.class, graph = TinkerGraph.class)
-@Deprecated
-public class TinkerGraphStructurePerformanceTest {
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1dc42d2/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/groovy/TinkerGraphGroovyEnvironmentPerformanceTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/groovy/TinkerGraphGroovyEnvironmentPerformanceTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/groovy/TinkerGraphGroovyEnvironmentPerformanceTest.java
deleted file mode 100644
index 0a35222..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/groovy/TinkerGraphGroovyEnvironmentPerformanceTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.tinkerpop.gremlin.tinkergraph.structure.groovy;
-
-import org.apache.tinkerpop.gremlin.GraphProviderClass;
-import org.apache.tinkerpop.gremlin.groovy.GroovyEnvironmentPerformanceSuite;
-import org.apache.tinkerpop.gremlin.groovy.loaders.SugarLoader;
-import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
-import org.junit.runner.RunWith;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @deprecated As of release 3.2.1, replaced by gremlin-benchmark.
- */
-@Deprecated
-@RunWith(GroovyEnvironmentPerformanceSuite.class)
-@GraphProviderClass(provider = TinkerGraphProvider.class, graph = TinkerGraph.class)
-public class TinkerGraphGroovyEnvironmentPerformanceTest {
- static {
- SugarLoader.load();
- }
-}
\ No newline at end of file