javeme commented on code in PR #2860:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2860#discussion_r2328637371


##########
hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample6.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.example;
+
+import org.apache.hugegraph.HugeFactory;
+import org.apache.hugegraph.util.Log;
+import org.apache.tinkerpop.gremlin.structure.T;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.slf4j.Logger;
+
+/**
+ * Perf test for: query vertices/adj-edges by ids
+ */
+public class PerfExample6 extends PerfExample5 {
+
+    private static final Logger LOG = Log.logger(PerfExample6.class);
+
+    /**
+     * Main method
+     * @param args 3 arguments, 1st should be 1, meaning single thread,
+     *             product of 2nd and 3rd is total number of "person" vertices
+     * @throws InterruptedException
+     */
+    public static void main(String[] args) throws Exception {
+        PerfExample6 tester = new PerfExample6();
+        tester.test(args);
+
+        // Stop daemon thread
+        HugeFactory.shutdown(30L);
+    }
+
+    @Override
+    protected void testInsert(GraphManager graph, int times, int multiple) {
+        final int TIMES = times * multiple;

Review Comment:
   Only the insertion test involves batch, and batch is not a dimension we 
test, so keep it for now.



##########
hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample1.java:
##########
@@ -34,6 +36,8 @@
  */
 public class PerfExample1 extends PerfExampleBase {
 
+    private static final Logger LOG = Log.logger(PerfExample1.class);

Review Comment:
   this time we marked the PerfExampleBase.LOG as private.



##########
hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample5.java:
##########
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.example;
+
+import java.util.Iterator;
+
+import org.apache.hugegraph.HugeFactory;
+import org.apache.hugegraph.type.define.Directions;
+import org.apache.hugegraph.util.Log;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.slf4j.Logger;
+
+/**

Review Comment:
   PerfExample3 is a test for: insert vertices with indexes in order



##########
hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample6.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.example;
+
+import org.apache.hugegraph.HugeFactory;
+import org.apache.hugegraph.util.Log;
+import org.apache.tinkerpop.gremlin.structure.T;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.slf4j.Logger;
+
+/**
+ * Perf test for: query vertices/adj-edges by ids
+ */

Review Comment:
   In this PerfExample6 test, we insert some edges (one edge per vertex) for 
adj-edges test.



-- 
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