From d49b1c0b29e25ed472ad3aeafb327490a8d38864 Mon Sep 17 00:00:00 2001 From: Vasilij Litvinov Date: Wed, 29 Jul 2020 00:29:38 +0300 Subject: [PATCH] FEAT-#1831: Ignore print() rule for trace parser Signed-off-by: Vasilij Litvinov --- .../cloud/tracing/parse_rpyc_trace.py | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/modin/experimental/cloud/tracing/parse_rpyc_trace.py b/modin/experimental/cloud/tracing/parse_rpyc_trace.py index 2d30c368063..92d172a3140 100644 --- a/modin/experimental/cloud/tracing/parse_rpyc_trace.py +++ b/modin/experimental/cloud/tracing/parse_rpyc_trace.py @@ -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"] @@ -68,10 +68,10 @@ def get_syncs(items): for i in s_sends: buckets[i.get("req", "")].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" @@ -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"])),