Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 062f1d8

Browse files
committed
Add naive parallelization
1 parent 61f2f8e commit 062f1d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/benchmark/Neo4jBenchmark.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,11 @@ public static void benchmark(String relType, int nodeNumber, int warmUp, int max
298298
}
299299

300300
List<Tuple<Integer, Integer>> chunkSize = Arrays.asList(
301-
new Tuple<>(1, 100)
301+
// new Tuple<>(nodeNumber, 100)
302302
// new Tuple<>(1, 100)
303303
// , new Tuple<>(10, 100)
304304
// , new Tuple<>(50, 100)
305-
// , new Tuple<>(100, 100)
305+
new Tuple<>(100, 100)
306306
// , new Tuple<>(500, 100)
307307
// , new Tuple<>(1000, 100)
308308
// , new Tuple<>(5000, 100)
@@ -321,7 +321,7 @@ public static void benchmark(String relType, int nodeNumber, int warmUp, int max
321321
resulTimePerChunk.print(iter - warmUp + 1);
322322
}
323323
int finalIter = iter;
324-
verticesPartitioned.forEach(chunk -> {
324+
verticesPartitioned.parallelStream().forEach(chunk -> {
325325
GraphInput input = new Neo4jBenchmarkInput(graphDb, f, chunk.stream(), nodeNumber);
326326
System.out.println("iteration: " + finalIter + " first vertex: " + chunk.get(0));
327327
long t1_local = System.nanoTime();

0 commit comments

Comments
 (0)