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

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

[~rjbriody] I just realized the solution to this. 

{code}
groupCount()
groupCount('m')
{code}

Whats the difference? The first is {{GroupCountStep}} the second is 
{{GroupCountSideEffectStep}}. The first is a reducer that pops out a 
{{Map<Object,Long>}}, the second is a sideEffect that stores the 
{{Map<Object,Long>}} in {{traversal.getSideEffects().get('m')}} and simply 
passes the incoming traverser to output undisturbed.

This is how {{profile()}} should work:

{code}
profile() -> ProfileStep
profile('m') -> ProfileSideEffectStep
{code}

Then its consistent with the pattern used by other {{sideEffect/map}}-steps and 
it does what you want.

> Improve usability of .profile() step.
> -------------------------------------
>
>                 Key: TINKERPOP-958
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-958
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>            Reporter: Bob Briody
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.2.0-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.- (Moved to own ticket: 
> https://issues.apache.org/jira/browse/TINKERPOP-1078)



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

Reply via email to