Skip to content

Commit

Permalink
tools: add reply_route support to route_graph.py tool
Browse files Browse the repository at this point in the history
  • Loading branch information
henningw committed Sep 20, 2019
1 parent 4a66e50 commit f58c3ce
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions misc/tools/route_graph/route_graph.py
Expand Up @@ -37,6 +37,7 @@
routes = {}
f_routes = {}
b_routes = {}
or_routes = {}
r_routes = {}
s_routes = {}
e_routes = {}
Expand Down Expand Up @@ -104,9 +105,13 @@ def traverse_routes(_level, _name):
if rname is None:
rname = "failure"
elif rtype == "onreply_":
rt = r_routes
rt = or_routes
if rname is None:
rname = "onreply"
elif rtype == "reply_":
rt = r_routes
if rname is None:
rname = "reply"
elif rtype == "onsend_":
rt = s_routes
if rname is None:
Expand All @@ -130,8 +135,11 @@ def traverse_routes(_level, _name):
rt = f_routes
rname = "failure"
elif rtype == "onreply_":
rt = r_routes
rt = or_routes
rname = "onreply"
elif rtype == "reply_":
rt = r_routes
rname = "reply"
elif rtype == "onsend_":
rt = s_routes
rname = "onsend"
Expand All @@ -151,7 +159,8 @@ def traverse_routes(_level, _name):
log("routes: %s" % (routes))
log("branch_routes: %s" % (b_routes))
log("failure_routes: %s" % (f_routes))
log("onreply_routes: %s" % (r_routes))
log("onreply_routes: %s" % (or_routes))
log("reply_routes: %s" % (r_routes))
log("onsend_routes: %s" % (s_routes))
log("event_routes: %s" % (e_routes))

Expand Down Expand Up @@ -193,8 +202,15 @@ def traverse_routes(_level, _name):
for r in f_routes[fr]:
traverse_routes(1, r)

if len(r_routes) > 0:
if len(or_routes) > 0:
print "\nOnreply routes\n--------------"
for onr in or_routes.keys():
print "\n%s" % (onr)
for r in or_routes[onr]:
traverse_routes(1, r)

if len(r_routes) > 0:
print "\nReply routes\n--------------"
for onr in r_routes.keys():
print "\n%s" % (onr)
for r in r_routes[onr]:
Expand Down

0 comments on commit f58c3ce

Please sign in to comment.