Loading notebook.ipynb +354 −14 File changed.Preview size limit exceeded, changes collapsed. Show changes xlap.h +102 −100 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ typedef union XlapTimestamp { PrrtEncodeEnd, \ PrrtTransmitStart, \ PrrtTransmitEnd, \ PrrtSendPacketStart, \ PrrtSendPacketEnd, \ LinkTransmitStart, \ LinkTransmitEnd, \ ChannelTransmit, \ Loading xlap.yml +16 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,14 @@ stamps: Source: sender Thread: trans_send Type: cycle PrrtSendPacketStart: Source: sender Thread: trans_send Type: cycle PrrtSendPacketEnd: Source: sender Thread: trans_send Type: cycle LinkTransmitStart: Source: sender Thread: trans_send Loading @@ -64,7 +72,15 @@ stamps: Source: sender Thread: trans_send Type: time ChannelTransmit: Source: sender Thread: trans_send Type: none ChannelReceive: Source: receiver Thread: trans_send Type: none LinkReceive: Source: receiver Thread: trans_recv Loading xlap/parse.py +4 −4 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ import ruamel.yaml as yaml def _stamp_name_by_src_and_type(all_stamps, src, kind=None): if kind is None: kind = ["time", "cycle"] kind = ["time", "cycle", "none"] return [c for c, v in all_stamps.items() if v["Source"] == src and v["Type"] in kind] def _stamp_name_by_thread_and_type(all_stamps, thread, kind=None): Loading @@ -13,7 +13,7 @@ def _stamp_name_by_thread_and_type(all_stamps, thread, kind=None): kind = ["time", "cycle"] return [c for c, v in all_stamps.items() if v["Thread"] == thread and v["Type"] in kind] def _extract_stamps_by_type(all_stamps, src, kind=None): def _extract_stamps_by_src_and_kind(all_stamps, src, kind=None): columns = _stamp_name_by_src_and_type(all_stamps, src, kind) return [x + "_T" for x in columns] + [x + "_C" for x in columns] Loading @@ -26,9 +26,9 @@ def _evaluate_file(file_name, stamps, kind, sender=False): # Drop columns of opposing side. if sender: df.drop(_extract_stamps_by_type(stamps, "receiver"), axis=1, inplace=True) df.drop(_extract_stamps_by_src_and_kind(stamps, "receiver"), axis=1, inplace=True) else: df.drop(_extract_stamps_by_type(stamps, "sender"), axis=1, inplace=True) df.drop(_extract_stamps_by_src_and_kind(stamps, "sender"), axis=1, inplace=True) # Drop empty rows (as they have probably not been written out). return df[pd.notnull(df).all(axis=1)] Loading Loading
xlap.h +102 −100 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ typedef union XlapTimestamp { PrrtEncodeEnd, \ PrrtTransmitStart, \ PrrtTransmitEnd, \ PrrtSendPacketStart, \ PrrtSendPacketEnd, \ LinkTransmitStart, \ LinkTransmitEnd, \ ChannelTransmit, \ Loading
xlap.yml +16 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,14 @@ stamps: Source: sender Thread: trans_send Type: cycle PrrtSendPacketStart: Source: sender Thread: trans_send Type: cycle PrrtSendPacketEnd: Source: sender Thread: trans_send Type: cycle LinkTransmitStart: Source: sender Thread: trans_send Loading @@ -64,7 +72,15 @@ stamps: Source: sender Thread: trans_send Type: time ChannelTransmit: Source: sender Thread: trans_send Type: none ChannelReceive: Source: receiver Thread: trans_send Type: none LinkReceive: Source: receiver Thread: trans_recv Loading
xlap/parse.py +4 −4 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ import ruamel.yaml as yaml def _stamp_name_by_src_and_type(all_stamps, src, kind=None): if kind is None: kind = ["time", "cycle"] kind = ["time", "cycle", "none"] return [c for c, v in all_stamps.items() if v["Source"] == src and v["Type"] in kind] def _stamp_name_by_thread_and_type(all_stamps, thread, kind=None): Loading @@ -13,7 +13,7 @@ def _stamp_name_by_thread_and_type(all_stamps, thread, kind=None): kind = ["time", "cycle"] return [c for c, v in all_stamps.items() if v["Thread"] == thread and v["Type"] in kind] def _extract_stamps_by_type(all_stamps, src, kind=None): def _extract_stamps_by_src_and_kind(all_stamps, src, kind=None): columns = _stamp_name_by_src_and_type(all_stamps, src, kind) return [x + "_T" for x in columns] + [x + "_C" for x in columns] Loading @@ -26,9 +26,9 @@ def _evaluate_file(file_name, stamps, kind, sender=False): # Drop columns of opposing side. if sender: df.drop(_extract_stamps_by_type(stamps, "receiver"), axis=1, inplace=True) df.drop(_extract_stamps_by_src_and_kind(stamps, "receiver"), axis=1, inplace=True) else: df.drop(_extract_stamps_by_type(stamps, "sender"), axis=1, inplace=True) df.drop(_extract_stamps_by_src_and_kind(stamps, "sender"), axis=1, inplace=True) # Drop empty rows (as they have probably not been written out). return df[pd.notnull(df).all(axis=1)] Loading