[ 
https://issues.apache.org/jira/browse/TINKERPOP3-958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15025287#comment-15025287
 ] 

Marko A. Rodriguez commented on TINKERPOP3-958:
-----------------------------------------------

I think we should make it like this.

{code}
g.V...out().profile()  --> TraversalMetrics
{code}

This does NOT return a traversal, but instead, like {{explain()}}, execute the 
traversal and returns the {{TraversalMetric}}. Thus, once you do {{profile()}}, 
the traversal is locked. It MUST be the last "step" in the traversal definition.

and then we have:

{code}
g.V...out().profileWithResults() --> Traversal<Vertex,Vertex>
{code}

The latter is currently what we do with {{profile()}} and thus, this will be a 
breaking change. The {{TraversalMetrics}} is retrieved via 
{{t.sideEffects().get(..)}}.

> Improve usability of .profile() step.
> -------------------------------------
>
>                 Key: TINKERPOP3-958
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-958
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: process
>            Reporter: Bob Briody
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.1.1-incubating
>
>
> The .profile() step is currently tedious to use. One must remember this 
> entire string to activate profiling and cap off the result: 
> "profile().cap(TraversalMetrics.METRICS_KEY)".
> This should be streamlined.
> Additionally, if the TraversalMetrics are cap'd off the end of the traversal 
> then this step and the duration it takes should be excluded from the metrics 
> and timers.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to