From eb70f4ac91149f070f4ee49c2262ada5b026cd29 Mon Sep 17 00:00:00 2001 From: feger <marc.feger@hhu.de> Date: Tue, 26 Feb 2019 13:08:38 +0100 Subject: [PATCH] Get total time of database load --- api/graph.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/graph.py b/api/graph.py index 965dd84..1507555 100644 --- a/api/graph.py +++ b/api/graph.py @@ -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 -- GitLab