Harness - match group setup fix
Summary: I was mistaken in my calculations before and gave it +-3sigma tolerance (0.0027 probability of failure). Now I changed it to +-5sigma, which is good enough for CERN, and should be for us too. Reviewers: mislav.bradac, mferencevic Reviewed By: mislav.bradac Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D780
This commit is contained in:
parent
bfc56440a1
commit
00723d34c3
@ -63,12 +63,16 @@ def main():
|
||||
print(";")
|
||||
print("MATCH (n) RETURN assert(count(n) = %d);" % VERTEX_COUNT)
|
||||
|
||||
# create edges
|
||||
# create edges stohastically
|
||||
attempts = VERTEX_COUNT ** 2
|
||||
p = EDGE_COUNT / VERTEX_COUNT ** 2
|
||||
print("MATCH (a) WITH a MATCH (b) WITH a, b WHERE rand() < %f "
|
||||
" CREATE (a)-[:EdgeType]->(b);" % (EDGE_COUNT / VERTEX_COUNT ** 2))
|
||||
" CREATE (a)-[:EdgeType]->(b);" % p)
|
||||
sigma = (attempts * p * (1 - p)) ** 0.5
|
||||
delta = 5 * sigma
|
||||
print("MATCH (n)-[r]->() WITH count(r) AS c "
|
||||
"RETURN assert(c >= %d AND c <= %d);" % (
|
||||
EDGE_COUNT * 0.98, EDGE_COUNT * 1.02))
|
||||
EDGE_COUNT - delta, EDGE_COUNT + delta))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user