Cleanup ctf conversion function

This commit is contained in:
Christophe Bedard 2019-06-27 09:27:04 +02:00
parent 70f51087b9
commit 19450ff028

View file

@ -27,25 +27,15 @@ def ctf_to_pickle(trace_directory: str, target: Pickler) -> int:
:param target: the target pickle file to write to
:return: the number of events written
"""
# add traces
print(f'Importing trace directory: {trace_directory}')
ctf_events = utils._get_trace_ctf_events(trace_directory)
count = 0
count_written = 0
# count_pid_matched = 0
# traced = set()
# PID_KEYS = ['vpid', 'pid']
for event in ctf_events:
count += 1
# pid = None
# for key in PID_KEYS:
# if key in event.keys():
# pid = event[key]
# break
# Write all for now
pod = utils.event_to_dict(event)
target.dump(pod)
count_written += 1