You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2017/01/11 17:53:55 UTC
[47/50] [abbrv] tinkerpop git commit: added the @dkuppitz example to
the AkkaGraphActors test/ package for playing and benchmarking.
added the @dkuppitz example to the AkkaGraphActors test/ package for playing and benchmarking.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/32ab8fdb
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/32ab8fdb
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/32ab8fdb
Branch: refs/heads/TINKERPOP-1564
Commit: 32ab8fdb990c33ca7569722868c4e703d6bd9575
Parents: 3ac3216
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Jan 4 15:10:25 2017 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Jan 11 10:52:48 2017 -0700
----------------------------------------------------------------------
akka-gremlin/pom.xml | 6 +++
.../process/actors/AkkaGroovyPlayTest.groovy | 53 ++++++++++++++++++++
2 files changed, 59 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/32ab8fdb/akka-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/akka-gremlin/pom.xml b/akka-gremlin/pom.xml
index e9f5345..f88ec7d 100644
--- a/akka-gremlin/pom.xml
+++ b/akka-gremlin/pom.xml
@@ -54,6 +54,12 @@
<!-- TEST -->
<dependency>
<groupId>org.apache.tinkerpop</groupId>
+ <artifactId>gremlin-groovy</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-test</artifactId>
<version>3.3.0-SNAPSHOT</version>
<scope>test</scope>
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/32ab8fdb/akka-gremlin/src/test/groovy/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaGroovyPlayTest.groovy
----------------------------------------------------------------------
diff --git a/akka-gremlin/src/test/groovy/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaGroovyPlayTest.groovy b/akka-gremlin/src/test/groovy/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaGroovyPlayTest.groovy
new file mode 100644
index 0000000..2102abb
--- /dev/null
+++ b/akka-gremlin/src/test/groovy/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaGroovyPlayTest.groovy
@@ -0,0 +1,53 @@
+/*
+ * 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.akka.process.actors
+
+import org.apache.tinkerpop.gremlin.process.computer.Computer
+import org.apache.tinkerpop.gremlin.structure.T
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph
+import org.apache.tinkerpop.gremlin.util.TimeUtil
+import org.junit.Ignore
+import org.junit.Test
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ */
+class AkkaGroovyPlayTest {
+
+ @Test
+ @Ignore
+ public void testStuff() {
+
+ def graph = TinkerGraph.open()
+ def g = graph.traversal()
+ def a = graph.traversal().withProcessor(AkkaGraphActors.open().workers(8));
+ def r = new Random(123)
+
+ (1..1000000).each {
+ def vid = ["a", "b", "c", "d"].collectEntries { [it, r.nextInt() % 400000] }
+ graph.addVertex(T.id, vid)
+ }; []
+
+ println TimeUtil.clockWithResult(1) { g.V().id().select("c").count().next() }
+ println TimeUtil.clockWithResult(1) { g.V().id().select("c").dedup().count().next() }
+ println TimeUtil.clockWithResult(1) { a.V().id().select("c").count().next() }
+ println TimeUtil.clockWithResult(1) { a.V().id().select("c").dedup().count().next() }
+ }
+}