diff --git a/tests/macro_benchmark/groups/bfs_parallel/bfs.run.py b/tests/macro_benchmark/groups/bfs_parallel/bfs.run.py index 145044186..89c0f48af 100644 --- a/tests/macro_benchmark/groups/bfs_parallel/bfs.run.py +++ b/tests/macro_benchmark/groups/bfs_parallel/bfs.run.py @@ -1,11 +1,15 @@ import random import common +# Here we set seed to 1, instead of 0, because seed in setup is 0 and we want to +# be sure here that we will generate different numbers. +random.seed(1) + for i in range(common.BFS_ITERS): a = int(random.random() * common.VERTEX_COUNT) b = int(random.random() * common.VERTEX_COUNT) print("MATCH (from: Node {id: %d}) WITH from " "MATCH (to: Node {id: %d}) WITH to " "MATCH path = (from)-[*bfs..%d (e, n | true)]->(to) WITH path " - "LIMIT 10 RETURN 0;" + "LIMIT 10 RETURN 0;" % (a, b, common.PATH_LENGTH)) diff --git a/tests/macro_benchmark/groups/bfs_parallel/setup.py b/tests/macro_benchmark/groups/bfs_parallel/setup.py index 2a3a9b984..d845a75fd 100644 --- a/tests/macro_benchmark/groups/bfs_parallel/setup.py +++ b/tests/macro_benchmark/groups/bfs_parallel/setup.py @@ -1,6 +1,8 @@ import random import common +random.seed(0) + for i in range(common.VERTEX_COUNT): print("CREATE (n: Node {id: %d});" % i) diff --git a/tests/macro_benchmark/groups/create_parallel/edge.run.py b/tests/macro_benchmark/groups/create_parallel/edge.run.py index 17383cd6a..573389f98 100644 --- a/tests/macro_benchmark/groups/create_parallel/edge.run.py +++ b/tests/macro_benchmark/groups/create_parallel/edge.run.py @@ -1,6 +1,8 @@ import random import common +random.seed(0) + for i in range(common.VERTEX_COUNT * common.QUERIES_PER_VERTEX): a = int(random.random() * common.VERTEX_COUNT) b = int(random.random() * common.VERTEX_COUNT) diff --git a/tests/macro_benchmark/groups/delete/common.py b/tests/macro_benchmark/groups/delete/common.py index 026597ca0..c4a0336ff 100644 --- a/tests/macro_benchmark/groups/delete/common.py +++ b/tests/macro_benchmark/groups/delete/common.py @@ -1,9 +1,10 @@ """ This file does nothing, it's just utilities for other setups """ -from random import randint +from random import randint, seed BATCH_SIZE = 100 +seed(0) def create_vertices(vertex_count): diff --git a/tests/macro_benchmark/groups/match/setup.py b/tests/macro_benchmark/groups/match/setup.py index 0268836d3..7102da1b9 100644 --- a/tests/macro_benchmark/groups/match/setup.py +++ b/tests/macro_benchmark/groups/match/setup.py @@ -2,9 +2,11 @@ Generates a random graph with some configurable statistics. """ -from random import randint +from random import randint, seed +seed(0) + def rint(upper_bound_exclusive): return randint(0, upper_bound_exclusive - 1)