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

stephen mallette commented on TINKERPOP-1992:
---------------------------------------------

Identified the problem, but not sure how to fix it - note that in {{GroupStep}} 
we grab the first barrier:

https://github.com/apache/tinkerpop/blob/9ab5efa6772bb831238f6c9a4e46fc925a45ddaa/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroupStep.java#L73

and we iterate that:

https://github.com/apache/tinkerpop/blob/9ab5efa6772bb831238f6c9a4e46fc925a45ddaa/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroupStep.java#L89

and therefore if a {{ProfileStep}} is present then we don't start its timer. as 
a result, when the traversal timers get normalized you end up with a negative 
value.


> count has negative time in profile
> ----------------------------------
>
>                 Key: TINKERPOP-1992
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1992
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.3.3, 3.2.9
>            Reporter: Robert Dale
>            Priority: Minor
>
> {noformat}
> gremlin> g.V().group().by().by(bothE().count()).profile()
> ==>Traversal Metrics
> Step                                                               Count  
> Traversers       Time (ms)    % Dur
> =============================================================================================================
> TinkerGraphStep(vertex,[])                                         19172      
>  19172           4.957     5.24
> GroupStep(identity,[VertexStep(BOTH,edge), Prof...                     1      
>      1          89.696    94.76
>   VertexStep(BOTH,edge)                                            84812      
>  84812          50.723
>   CountGlobalStep                                                  19172      
>  19172         -39.649
>                                             >TOTAL                     -      
>      -          94.654        -
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to