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 2015/11/24 18:18:12 UTC

[1/3] incubator-tinkerpop git commit: profile()-step is now off of Traversal as it is generally useful beyond GraphTraversal. The philosophy here is the one we used for why Traversal has next(), hasNext(), toList(), toSet(), explain(), iterate(), etc. Ne

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master b0af65cb9 -> 727fd6c51


profile()-step is now off of Traversal as it is generally useful beyond GraphTraversal. The philosophy here is the one we used for why Traversal has next(), hasNext(), toList(), toSet(), explain(), iterate(), etc. Next, I removed __.profile() as method as you should never profile like that....weird. I updated the GraphTraversalTest accordingly. Ran mvn clean insatll and all is golden. This is backwards compatible save the __.profile()-removal  which wouldn't work anyways so......


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/c23a69ba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/c23a69ba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/c23a69ba

Branch: refs/heads/master
Commit: c23a69bac5967292ee566ec8af4e71663be3034c
Parents: e946d69
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Nov 23 14:45:02 2015 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Nov 23 14:45:02 2015 -0700

----------------------------------------------------------------------
 .../tinkerpop/gremlin/process/traversal/Traversal.java    | 10 ++++++++++
 .../tinkerpop/gremlin/process/traversal/dsl/graph/__.java |  4 ----
 .../process/traversal/dsl/graph/GraphTraversalTest.java   |  2 +-
 .../traversal/step/sideEffect/ProfileStepTest.java        |  2 +-
 4 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c23a69ba/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java
index 2c467cf..f167fb3 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java
@@ -23,6 +23,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
 import org.apache.tinkerpop.gremlin.process.traversal.engine.ComputerTraversalEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.engine.StandardTraversalEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
@@ -172,6 +173,15 @@ public interface Traversal<S, E> extends Iterator<E>, Serializable, Cloneable {
     }
 
     /**
+     * Profile the traversal.
+     *
+     * @return the updated traversal with respective {@link ProfileStep}.
+     */
+    public default Traversal<S, E> profile() {
+        return this.asAdmin().addStep(new ProfileStep<>(this.asAdmin()));
+    }
+
+    /**
      * Return a {@link TraversalExplanation} that shows how this traversal will mutate with each applied {@link TraversalStrategy}.
      *
      * @return a traversal explanation

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c23a69ba/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java
index f90d9dd..ff0a9a5 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java
@@ -827,10 +827,6 @@ public class __ {
         return __.<A>start().as(label, labels);
     }
 
-    public static <A> GraphTraversal<A, A> profile() {
-        return __.<A>start().profile();
-    }
-
     public static <A> GraphTraversal<A, A> barrier() {
         return __.<A>start().barrier();
     }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c23a69ba/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
index f9142cc..97da482 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
@@ -31,7 +31,7 @@ import java.util.Set;
  */
 public class GraphTraversalTest {
 
-    private static Set<String> NO_GRAPH = new HashSet<>(Arrays.asList("asAdmin", "by", "option", "iterate", "to", "from"));
+    private static Set<String> NO_GRAPH = new HashSet<>(Arrays.asList("asAdmin", "by", "option", "iterate", "to", "from", "profile"));
     private static Set<String> NO_ANONYMOUS = new HashSet<>(Arrays.asList("start", "__"));
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c23a69ba/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/ProfileStepTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/ProfileStepTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/ProfileStepTest.java
index 476d4fe..4b7a57b 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/ProfileStepTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/ProfileStepTest.java
@@ -32,6 +32,6 @@ public class ProfileStepTest extends StepTest {
 
     @Override
     protected List<Traversal> getTraversals() {
-        return Collections.singletonList(__.profile());
+        return Collections.singletonList(__.identity().profile());
     }
 }


[3/3] incubator-tinkerpop git commit: updated CHANGELOG.

Posted by ok...@apache.org.
updated CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/727fd6c5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/727fd6c5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/727fd6c5

Branch: refs/heads/master
Commit: 727fd6c5100aae33e278e0c0b5d71be69d685c4a
Parents: 1d9a1e4
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Nov 24 10:18:07 2015 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Nov 24 10:18:07 2015 -0700

----------------------------------------------------------------------
 CHANGELOG.asciidoc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/727fd6c5/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index cf14fd1..2aca7dd 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
 TinkerPop 3.1.1 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* `ProfileStep` is now available off of `Traversal` via `profile()`. To be consistent with `Traversal.explain()`.
 * If no comparator is provided to `order()`, `Order.incr` is assumed (previously, an exception occurred).
 * Fixed various Gremlin-Groovy tests that assumed `toString()`-able ids.
 * Split TinkerPop documentation into different directories.


[2/3] incubator-tinkerpop git commit: Merge branch 'TINKERPOP3-970'

Posted by ok...@apache.org.
Merge branch 'TINKERPOP3-970'


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/1d9a1e40
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/1d9a1e40
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/1d9a1e40

Branch: refs/heads/master
Commit: 1d9a1e40722c8e0c2264137de11370f18b928ffb
Parents: b0af65c c23a69b
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Nov 24 10:17:19 2015 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Nov 24 10:17:19 2015 -0700

----------------------------------------------------------------------
 .../tinkerpop/gremlin/process/traversal/Traversal.java    | 10 ++++++++++
 .../tinkerpop/gremlin/process/traversal/dsl/graph/__.java |  4 ----
 .../process/traversal/dsl/graph/GraphTraversalTest.java   |  2 +-
 .../traversal/step/sideEffect/ProfileStepTest.java        |  2 +-
 4 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------