Skip to content
Snippets Groups Projects
Commit eb70f4ac authored by Marc Feger's avatar Marc Feger
Browse files

Get total time of database load

parent 39d7ae13
Branches
No related tags found
No related merge requests found
......@@ -35,7 +35,8 @@ class Graph(object):
"statement_to_issue_time": t7,
"user_rates_own_positions_time": t8,
"random_ratings_time": t9,
"delete_zero_ratings_time": t10
"delete_zero_ratings_time": t10,
"total": sum([t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10])
}
def run(self, func):
......@@ -136,7 +137,8 @@ class Graph(object):
result = tx.run(
"MATCH (user:User) "
"WHERE NOT EXISTS((user)-[:LIKES]->()) "
"MATCH (statement:Statement{is_position: True}) "
"MATCH (statement:Statement) "
"WHERE statement.is_position "
"MERGE (user)-[:LIKES{rating:round(rand()*5)}]->(statement)"
)
return result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment