You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by tw...@apache.org on 2016/02/07 21:52:58 UTC
[1/4] incubator-tinkerpop git commit: Full quantum-gremlin image by
Ketrina. Will announce with GraphDay slides.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/TINKERPOP-1016 70640684f -> 6d802aa79
Full quantum-gremlin image by Ketrina. Will announce with GraphDay slides.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/cfa2592c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/cfa2592c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/cfa2592c
Branch: refs/heads/TINKERPOP-1016
Commit: cfa2592c0418833c9c1020983d66fd63ace1a314
Parents: 2f16c77
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Sat Dec 26 10:16:32 2015 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Sat Dec 26 10:16:32 2015 -0700
----------------------------------------------------------------------
docs/static/images/quantum-gremlin-full.png | Bin 0 -> 1730640 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cfa2592c/docs/static/images/quantum-gremlin-full.png
----------------------------------------------------------------------
diff --git a/docs/static/images/quantum-gremlin-full.png b/docs/static/images/quantum-gremlin-full.png
new file mode 100644
index 0000000..0e813b5
Binary files /dev/null and b/docs/static/images/quantum-gremlin-full.png differ
[2/4] incubator-tinkerpop git commit: Full quantum-gremlin image by
Ketrina. Will announce with GraphDay slides.
Posted by tw...@apache.org.
Full quantum-gremlin image by Ketrina. Will announce with GraphDay slides.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/5406e525
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/5406e525
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/5406e525
Branch: refs/heads/TINKERPOP-1016
Commit: 5406e525c8fc830c95a50b6b81ff828332fe9e03
Parents: cfa2592
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Sat Dec 26 10:18:50 2015 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Sat Dec 26 10:18:50 2015 -0700
----------------------------------------------------------------------
docs/static/images/quantum-gremlin-full.png | Bin 1730640 -> 1804044 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5406e525/docs/static/images/quantum-gremlin-full.png
----------------------------------------------------------------------
diff --git a/docs/static/images/quantum-gremlin-full.png b/docs/static/images/quantum-gremlin-full.png
index 0e813b5..4ae361d 100644
Binary files a/docs/static/images/quantum-gremlin-full.png and b/docs/static/images/quantum-gremlin-full.png differ
[4/4] incubator-tinkerpop git commit: Further refinement of
benchmarking abstract classes.
Posted by tw...@apache.org.
Further refinement of benchmarking abstract classes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/6d802aa7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/6d802aa7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/6d802aa7
Branch: refs/heads/TINKERPOP-1016
Commit: 6d802aa7938170e33cdb50121da32c1dcfb97eb4
Parents: 0b5be35
Author: Ted Wilmes <tw...@gmail.com>
Authored: Sun Feb 7 14:51:59 2016 -0600
Committer: Ted Wilmes <tw...@gmail.com>
Committed: Sun Feb 7 14:51:59 2016 -0600
----------------------------------------------------------------------
gremlin-benchmark/pom.xml | 5 ++
.../util/AbstractGraphMicrobenchmark.java | 46 ++++++++++
.../benchmark/util/AbstractMicrobenchmark.java | 63 +++++++++++++-
.../process/GraphTraversalBenchmark.java | 92 +++++++++++++++++---
.../process/strategy/StrategyBenchmark.java | 7 ++
.../apache/tinkerpop/gremlin/LoadGraphWith.java | 2 +-
pom.xml | 1 -
7 files changed, 203 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6d802aa7/gremlin-benchmark/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-benchmark/pom.xml b/gremlin-benchmark/pom.xml
index c7cafc0..f6f85f6 100644
--- a/gremlin-benchmark/pom.xml
+++ b/gremlin-benchmark/pom.xml
@@ -64,6 +64,11 @@ THE POSSIBILITY OF SUCH DAMAGE.
<version>3.1.1-SNAPSHOT</version>
</dependency>
<dependency>
+ <groupId>org.apache.tinkerpop</groupId>
+ <artifactId>gremlin-test</artifactId>
+ <version>3.1.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>${jmh.version}</version>
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6d802aa7/gremlin-benchmark/src/test/java/org/apache/tinkerpop/benchmark/util/AbstractGraphMicrobenchmark.java
----------------------------------------------------------------------
diff --git a/gremlin-benchmark/src/test/java/org/apache/tinkerpop/benchmark/util/AbstractGraphMicrobenchmark.java b/gremlin-benchmark/src/test/java/org/apache/tinkerpop/benchmark/util/AbstractGraphMicrobenchmark.java
new file mode 100644
index 0000000..143ec2f
--- /dev/null
+++ b/gremlin-benchmark/src/test/java/org/apache/tinkerpop/benchmark/util/AbstractGraphMicrobenchmark.java
@@ -0,0 +1,46 @@
+package org.apache.tinkerpop.benchmark.util;
+
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+
+/**
+ * Created by twilmes on 2/7/16.
+ */
+@State(Scope.Thread)
+public class AbstractGraphMicrobenchmark extends AbstractMicrobenchmark {
+
+ public volatile Graph graph;
+ public volatile GraphTraversalSource g;
+
+ @Setup
+ public void setup() {
+ System.out.println("Declare: " + this.getClass());
+ final LoadGraphWith[] loadGraphWiths = this.getClass().getAnnotationsByType(LoadGraphWith.class);
+ final LoadGraphWith loadGraphWith = loadGraphWiths.length == 0 ? null : loadGraphWiths[0];
+ final LoadGraphWith.GraphData loadGraphWithData = null == loadGraphWith ? null : loadGraphWith.value();
+ System.out.println("FOOOOOOOOOOOOOOOOO: " + loadGraphWithData);
+ // load graph
+ switch(loadGraphWithData) {
+ case CLASSIC:
+ graph = TinkerFactory.createClassic();
+ g = graph.traversal();
+ break;
+ case MODERN:
+ graph = TinkerFactory.createModern();
+ break;
+ case CREW:
+ graph = TinkerFactory.createTheCrew();
+ break;
+ case GRATEFUL:
+
+ break;
+ default:
+ break;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6d802aa7/gremlin-benchmark/src/test/java/org/apache/tinkerpop/benchmark/util/AbstractMicrobenchmark.java
----------------------------------------------------------------------
diff --git a/gremlin-benchmark/src/test/java/org/apache/tinkerpop/benchmark/util/AbstractMicrobenchmark.java b/gremlin-benchmark/src/test/java/org/apache/tinkerpop/benchmark/util/AbstractMicrobenchmark.java
index 9e6a781..213c212 100644
--- a/gremlin-benchmark/src/test/java/org/apache/tinkerpop/benchmark/util/AbstractMicrobenchmark.java
+++ b/gremlin-benchmark/src/test/java/org/apache/tinkerpop/benchmark/util/AbstractMicrobenchmark.java
@@ -18,14 +18,45 @@
*/
package org.apache.tinkerpop.benchmark.util;
+import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
+import org.apache.tinkerpop.gremlin.FeatureRequirement;
+import org.apache.tinkerpop.gremlin.FeatureRequirementSet;
+import org.apache.tinkerpop.gremlin.GraphManager;
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.process.GraphTraversalBenchmark;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.TestName;
import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.ChainedOptionsBuilder;
import org.openjdk.jmh.runner.options.OptionsBuilder;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assume.assumeThat;
+
/**
* Base class for all JMH benchmarks. Based upon Netty's AbstractMicrobenchmark.
*/
@@ -34,9 +65,39 @@ import org.openjdk.jmh.runner.options.OptionsBuilder;
@Fork(AbstractMicrobenchmark.DEFAULT_FORKS)
public abstract class AbstractMicrobenchmark {
+
+
+// @State(Scope.Thread)
+// public static class TraversalState {
+// public volatile GraphTraversalSource g;
+// }
+//
+// @Setup(Level.Iteration)
+// public void setUp(GraphState graphState, TraversalState traversalState) throws Exception {
+//
+//// }
+//
+// @TearDown(Level.Iteration)
+// public void tearDown() {
+//
+// }
+
+ /**
+ * If using "parameterized test" junit will append an identifier to the end of the method name which prevents it
+ * from being found via reflection. This method removes that suffix.
+ */
+ private static String cleanMethodName(final String methodName) {
+ if (methodName.endsWith("]")) {
+ return methodName.substring(0, methodName.indexOf("["));
+ }
+
+ return methodName;
+ }
+
+
protected static final int DEFAULT_WARMUP_ITERATIONS = 10;
protected static final int DEFAULT_MEASURE_ITERATIONS = 10;
- protected static final int DEFAULT_FORKS = 2;
+ protected static final int DEFAULT_FORKS = 1;
protected static final String[] JVM_ARGS = {
"-server", "-Xms512m", "-Xmx512m"
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6d802aa7/gremlin-benchmark/src/test/java/org/apache/tinkerpop/gremlin/process/GraphTraversalBenchmark.java
----------------------------------------------------------------------
diff --git a/gremlin-benchmark/src/test/java/org/apache/tinkerpop/gremlin/process/GraphTraversalBenchmark.java b/gremlin-benchmark/src/test/java/org/apache/tinkerpop/gremlin/process/GraphTraversalBenchmark.java
index ea81b61..2d1b02b 100644
--- a/gremlin-benchmark/src/test/java/org/apache/tinkerpop/gremlin/process/GraphTraversalBenchmark.java
+++ b/gremlin-benchmark/src/test/java/org/apache/tinkerpop/gremlin/process/GraphTraversalBenchmark.java
@@ -19,36 +19,108 @@
package org.apache.tinkerpop.gremlin.process;
+import org.apache.tinkerpop.benchmark.util.AbstractGraphMicrobenchmark;
import org.apache.tinkerpop.benchmark.util.AbstractMicrobenchmark;
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.process.traversal.Path;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.Map;
+
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.out;
+
/**
* @author Ted Wilmes
*/
-public class GraphTraversalBenchmark extends AbstractMicrobenchmark {
+@State(Scope.Thread)
+@LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
+public class GraphTraversalBenchmark extends AbstractGraphMicrobenchmark {
+
+ @Benchmark
+ public Vertex graph_addVertex() {
+ return graph.addVertex("foo");
+ }
+
+ @Benchmark
+ public Vertex g_addV() {
+ return g.addV("foo").next();
+ }
+
+ @Benchmark
+ public List<Vertex> test_g_V() {
+ return g.V().toList();
+ }
+
+ @Benchmark
+ public List<Vertex> test_g_V_outE_inV_outE_inV_outE_inV() {
+ return g.V().outE().inV().outE().inV().outE().inV().toList();
+ }
+
+ @Benchmark
+ public List<Vertex> g_V_out_out_out() {
+ return g.V().out().out().out().toList();
+ }
- @State(Scope.Thread)
- public static class GraphState {
- volatile Graph graph = TinkerGraph.open();
+ @Benchmark
+ public List<Path> g_V_out_out_out_path() {
+ return g.V().out().out().out().path().toList();
}
- @State(Scope.Thread)
- public static class TraversalState {
- volatile GraphTraversalSource g = TinkerGraph.open().traversal();
+ @Benchmark
+ public List<Vertex> g_V_repeatXoutX_timesX2X() {
+ return g.V().repeat(out()).times(2).toList();
+ }
+
+ @Benchmark
+ public List<Vertex> g_V_repeatXoutX_timesX3X() {
+ return g.V().repeat(out()).times(3).toList();
}
@Benchmark
- public Vertex testAddVertex(GraphState state) { return state.graph.addVertex("foo"); }
+ public List<List<Object>> g_V_localXout_out_valuesXnameX_foldX() {
+ return g.V().local(out().out().values("name").fold()).toList();
+ }
+
+ @Benchmark
+ public List<List<Object>> g_V_out_localXout_out_valuesXnameX_foldX() {
+ return g.V().out().local(out().out().values("name").fold()).toList();
+ }
@Benchmark
- public Vertex testAddV(TraversalState state) {
- return state.g.addV("foo").next();
+ public List<List<Object>> g_V_out_mapXout_out_valuesXnameX_toListX() {
+ return g.V().out().map(v -> g.V(v.get()).out().out().values("name").toList()).toList();
}
+ @Benchmark
+ public List<Map<Object, Long>> g_V_label_groupCount() {
+ return g.V().label().groupCount().toList();
+ }
+
+ @Benchmark
+ public List<Object> g_V_match_selectXbX_valuesXnameX() {
+ return g.V().match(
+ __.as("a").has("name", "Garcia"),
+ __.as("a").in("writtenBy").as("b"),
+ __.as("a").in("sungBy").as("b")).select("b").values("name").toList();
+ }
+
+ @Benchmark
+ public List<Edge> g_E_hasLabelXwrittenByX_whereXinV_inEXsungByX_count_isX0XX_subgraphXsgX() {
+ return g.E().hasLabel("writtenBy").where(__.inV().inE("sungBy").count().is(0)).subgraph("sg").toList();
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6d802aa7/gremlin-benchmark/src/test/java/org/apache/tinkerpop/gremlin/process/strategy/StrategyBenchmark.java
----------------------------------------------------------------------
diff --git a/gremlin-benchmark/src/test/java/org/apache/tinkerpop/gremlin/process/strategy/StrategyBenchmark.java b/gremlin-benchmark/src/test/java/org/apache/tinkerpop/gremlin/process/strategy/StrategyBenchmark.java
new file mode 100644
index 0000000..0c9baf2
--- /dev/null
+++ b/gremlin-benchmark/src/test/java/org/apache/tinkerpop/gremlin/process/strategy/StrategyBenchmark.java
@@ -0,0 +1,7 @@
+package org.apache.tinkerpop.gremlin.process.strategy;
+
+/**
+ * Created by twilmes on 2/7/16.
+ */
+public class StrategyBenchmark {
+}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6d802aa7/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/LoadGraphWith.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/LoadGraphWith.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/LoadGraphWith.java
index 17893e5..45ea977 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/LoadGraphWith.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/LoadGraphWith.java
@@ -52,7 +52,7 @@ import static org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexFeatur
*/
@Inherited
@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.METHOD)
+@Target({ElementType.METHOD, ElementType.TYPE})
public @interface LoadGraphWith {
public enum GraphData {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6d802aa7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2ed408a..6e7cdfa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -118,7 +118,6 @@ limitations under the License.
<module>gremlin-driver</module>
<module>gremlin-console</module>
<module>gremlin-server</module>
- <module>gremlin-performance</module>
</modules>
<scm>
<connection>scm:git:git@git-wip-us.apache.org:repos/asf/incubator-tinkerpop.git</connection>
[3/4] incubator-tinkerpop git commit: Merge branch 'TINKERPOP-1016'
of https://git-wip-us.apache.org/repos/asf/incubator-tinkerpop into
TINKERPOP-1016
Posted by tw...@apache.org.
Merge branch 'TINKERPOP-1016' of https://git-wip-us.apache.org/repos/asf/incubator-tinkerpop into TINKERPOP-1016
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/0b5be351
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/0b5be351
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/0b5be351
Branch: refs/heads/TINKERPOP-1016
Commit: 0b5be3513f66562590521a4ffc1ed6aee4752457
Parents: 5406e52 7064068
Author: Ted Wilmes <tw...@gmail.com>
Authored: Thu Dec 31 10:16:26 2015 -0600
Committer: Ted Wilmes <tw...@gmail.com>
Committed: Thu Dec 31 10:16:26 2015 -0600
----------------------------------------------------------------------
gremlin-benchmark/pom.xml | 115 +++++++++++++++++++
.../benchmark/util/AbstractMicrobenchmark.java | 79 +++++++++++++
.../process/GraphTraversalBenchmark.java | 54 +++++++++
pom.xml | 1 +
4 files changed, 249 insertions(+)
----------------------------------------------------------------------