Complete basic callback duration processing

This commit is contained in:
Christophe Bedard 2019-06-06 09:22:38 +02:00
parent 7e99bcb0ab
commit 02f5eb339a
4 changed files with 52 additions and 18 deletions

View file

@ -3,7 +3,9 @@
import sys
import pickle
from tracetools_analysis.analysis.ros import *
import pandas as pd
from tracetools_analysis.analysis.ros_processor import *
from tracetools_analysis.analysis.to_pandas import *
def main(argv=sys.argv):
if len(argv) != 2:
@ -14,7 +16,11 @@ def main(argv=sys.argv):
with open(pickle_filename, 'rb') as f:
events = _get_events_from_pickled_file(f)
print(f'imported {len(events)} events')
ros_process(events)
processor = ros_process(events)
df = callback_durations_to_df(processor)
print(df.to_string())
def _get_events_from_pickled_file(file):
p = pickle.Unpickler(file)