Rename RosProcessor to Ros2Processor

This commit is contained in:
Christophe Bedard 2019-06-13 16:22:00 +02:00
parent 693d52f0ad
commit 54a2fde9a2
2 changed files with 7 additions and 7 deletions

View file

@ -5,21 +5,21 @@ from .lttng_models import get_field
from .data_model import DataModel
def ros_process(events):
def ros2_process(events):
"""
Process unpickled events and create ROS model.
Process unpickled events and create ROS 2 model.
:param events (list(dict(str:str:))): the list of events
:return the processor object
"""
processor = RosProcessor()
processor = Ros2Processor()
processor.handle_events(events)
return processor
class RosProcessor(EventHandler):
class Ros2Processor(EventHandler):
"""
ROS-aware event processing/handling class implementation.
ROS 2-aware event processing/handling class implementation.
Handles a trace's events and builds a model with the data.
"""

View file

@ -5,7 +5,7 @@ import argparse
import pickle
import time
from tracetools_analysis.analysis import processor, to_pandas
from tracetools_analysis.analysis import ros2_processor, to_pandas
from tracetools_analysis.analysis import data_model
def parse_args():
@ -23,7 +23,7 @@ def main():
start_time = time.time()
with open(pickle_filename, 'rb') as f:
events = _get_events_from_pickled_file(f)
p = processor.ros_process(events)
p = ros2_processor.ros2_process(events)
time_diff = time.time() - start_time
print(f'processed {len(events)} events in {time_diff * 1000:.2f} ms')