Skip to content

Commit

Permalink
FEAT-#1831: Ignore print() rule for trace parser
Browse files Browse the repository at this point in the history
Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
  • Loading branch information
vnlitvinov committed Jul 28, 2020
1 parent 9e5b082 commit d49b1c0
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions modin/experimental/cloud/tracing/parse_rpyc_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ def get_syncs(items):
items = read_log((sys.argv[1:] or ["rpyc-trace.log"])[0])
syncs = get_syncs(items)

print(
print( # noqa: T001
f"total time={sum(i['timing'] for i in syncs if i['kind'] == 'recv' and i['msg'] == 'MSG_REPLY')}"
)

longs = [i for i in syncs if i["timing"] > 0.5]
print(f'longs ({len(longs)}) time={sum(i["timing"] for i in longs)}')
print(f'longs ({len(longs)}) time={sum(i["timing"] for i in longs)}') # noqa: T001

s_sends = [i for i in syncs if i["kind"] == "send"]

Expand All @@ -68,10 +68,10 @@ def get_syncs(items):
for i in s_sends:
buckets[i.get("req", "<REVERSE>")].append(i["args"])

print("-------------------")
print("-------------------") # noqa: T001
for k, v in buckets.items():
print(f"{k}={len(v)}")
print("-------------------")
print(f"{k}={len(v)}") # noqa: T001
print("-------------------") # noqa: T001

sends = {
i["seq"]: i for i in items if i["kind"] == "send" and i["msg"] == "MSG_REQUEST"
Expand Down Expand Up @@ -187,38 +187,42 @@ def _parse_msg(m, s=False, **kw):
remote[got] = sent
# remote[from_getattr_recv(grecv, False)] = from_getattr_send(gsend, False)

print(f"total time getattrs={sum(x[1]['timing'] for x in getattrs)}")
print(f"total time getattrs={sum(x[1]['timing'] for x in getattrs)}") # noqa: T001

# import pdb; pdb.set_trace()

print("\n\n----[ getattr ]----")
print("\n\n----[ getattr ]----") # noqa: T001
for gsend, grecv in getattrs:
print(f"{from_getattr_send(gsend)} --> {from_getattr_recv(grecv)}")
print(f"{from_getattr_send(gsend)} --> {from_getattr_recv(grecv)}") # noqa: T001


print("\n\n----[ hash ]----")
print("\n\n----[ hash ]----") # noqa: T001
for i in syncs:
if i.get("req", "") == "HANDLE_HASH" and i["kind"] == "send":
print(from_hash_send(i), "-->", from_getattr_recv(responses.get(i["seq"])))
print( # noqa: T001
from_hash_send(i), "-->", from_getattr_recv(responses.get(i["seq"]))
)

print("\n\n----[ str ]----")
print("\n\n----[ str ]----") # noqa: T001
for i in syncs:
if i.get("req", "") == "HANDLE_STR" and i["kind"] == "send":
print(from_hash_send(i), "-->", from_getattr_recv(responses.get(i["seq"])))
print( # noqa: T001
from_hash_send(i), "-->", from_getattr_recv(responses.get(i["seq"]))
)

print("\n\n----[ callattr ]----")
print("\n\n----[ callattr ]----") # noqa: T001
for i in syncs:
if i.get("req", "") == "HANDLE_CALLATTR" and i["kind"] == "send":
print(
print( # noqa: T001
from_callattr_send(i, remote=remote),
"-->",
from_getattr_recv(responses.get(i["seq"])),
)

print("\n\n----[ call ]----")
print("\n\n----[ call ]----") # noqa: T001
for i in syncs:
if i.get("req", "") == "HANDLE_CALL" and i["kind"] == "send":
print(
print( # noqa: T001
from_call_send(i, remote=remote),
"-->",
from_getattr_recv(responses.get(i["seq"])),
Expand Down

0 comments on commit d49b1c0

Please sign in to comment.