memgraph/tests/benchmark_infra/groups/create/edge.run.py
Mislav Bradac 68e78c417b NeoRunner + Harness bugfix
Reviewers: mferencevic, buda

Reviewed By: mferencevic

Subscribers: mferencevic, pullbot

Differential Revision: https://phabricator.memgraph.io/D588
2017-07-29 17:46:24 +02:00

13 lines
270 B
Python

EDGE_COUNT = 100000
BATCH_SIZE = 50
query = []
while EDGE_COUNT > 0:
query.append("MATCH (a), (b)")
new_edges = min(BATCH_SIZE, EDGE_COUNT)
query.append('CREATE (a)-[:Type]->(b) ' * new_edges)
query.append(";")
EDGE_COUNT -= new_edges
print(" ".join(query))