DanGuge commented on code in PR #2262:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2262#discussion_r1291009910


##########
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java:
##########
@@ -82,13 +82,16 @@ public class HugeTraverser {
     public static final String DEFAULT_SAMPLE = "100";
     public static final String DEFAULT_WEIGHT = "0";
     public static final int DEFAULT_MAX_DEPTH = 5000;
-
-    protected static final int MAX_VERTICES = 10;
-
     // Empirical value of scan limit, with which results can be returned in 3s
     public static final String DEFAULT_PAGE_LIMIT = "100000";
-
     public static final long NO_LIMIT = -1L;
+    protected static final Logger LOG = Log.logger(HugeTraverser.class);
+    protected static final int MAX_VERTICES = 10;
+    private static CollectionFactory collectionFactory;
+    private final HugeGraph graph;
+    // for apimeasure
+    public AtomicLong edgeIterCounter = new AtomicLong(0);

Review Comment:
   HugeTraverser is the root class of all traverser algorithms, and there is a 
need for all sub-traverser algorithms to count the measuring statistics during 
traversering. So I think of two ways to solve this problems:
   1. Give HugeTraverser the ability to track the measuring statistics;
   2. Track the measuing statistics in all traverser functions which the 
Traverser APIs would call
   I think the first way is better & more elegant and this is the current 
implementation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to