def run_demo(updated_services):
# build both graphs from the edge descriptions
graph_a = Graph()
build_dummy_graph(GRAPH_A, graph_a)
graph_b = Graph()
build_dummy_graph(GRAPH_B, graph_b)
# print them as .dot files for reference
graph_a.print_graph("graph-a", True, True)
graph_b.print_graph("graph-b", False, True)
# generate the differences by considering an update on service 'a'
start_time = time.time()
diff_graph = graph_a.get_diff(graph_b, updated_services)
print("--- graph differences calculated in %s seconds --- " % (time.time() - start_time))
diff_graph.print_graph("graph-diff", False, True)
评论列表
文章目录