diff --git a/tracetools_analysis/tracetools_analysis/process.py b/tracetools_analysis/tracetools_analysis/process.py index bee7a44..8c407b4 100644 --- a/tracetools_analysis/tracetools_analysis/process.py +++ b/tracetools_analysis/tracetools_analysis/process.py @@ -19,8 +19,9 @@ import argparse import time from tracetools_analysis.loading import load_pickle -from tracetools_analysis.processor.cpu_time import CpuTimeProcessor -from tracetools_analysis.processor.ros2 import Ros2Processor +from tracetools_analysis.processor.cpu_time import CpuTimeHandler +from tracetools_analysis.processor.profile import ProfileHandler +from tracetools_analysis.processor.ros2 import Ros2Handler def parse_args(): @@ -37,11 +38,13 @@ def main(): start_time = time.time() events = load_pickle(pickle_filename) - processor = Ros2Processor.process(events) - cpu_processor = CpuTimeProcessor.process(events) + # ros2_handler = Ros2Handler.process(events) + # cpu_handler = CpuTimeHandler.process(events) + profile_handler = ProfileHandler.process(events) time_diff = time.time() - start_time print(f'processed {len(events)} events in {time_diff * 1000:.2f} ms') - processor.get_data_model().print_model() - cpu_processor.get_data_model().print_model() + # ros2_handler.get_data_model().print_model() + # cpu_handler.get_data_model().print_model() + profile_handler.get_data_model().print_model() diff --git a/tracetools_analysis/tracetools_analysis/processor/cpu_time.py b/tracetools_analysis/tracetools_analysis/processor/cpu_time.py index 58fed17..a76efda 100644 --- a/tracetools_analysis/tracetools_analysis/processor/cpu_time.py +++ b/tracetools_analysis/tracetools_analysis/processor/cpu_time.py @@ -23,9 +23,9 @@ from . import EventMetadata from ..data_model.cpu_time import CpuTimeDataModel -class CpuTimeProcessor(EventHandler): +class CpuTimeHandler(EventHandler): """ - Processor that extracts data for CPU time. + Handler that extracts data for CPU time. It extracts timestamps from sched_switch events to later compute CPU time per thread. """ diff --git a/tracetools_analysis/tracetools_analysis/processor/profile.py b/tracetools_analysis/tracetools_analysis/processor/profile.py index e648fbb..eee4db5 100644 --- a/tracetools_analysis/tracetools_analysis/processor/profile.py +++ b/tracetools_analysis/tracetools_analysis/processor/profile.py @@ -28,9 +28,9 @@ from . import EventMetadata from ..data_model.profile import ProfileDataModel -class ProfileProcessor(EventHandler): +class ProfileHandler(EventHandler): """ - Processor that extracts profiling information. + Handler that extracts profiling information. It uses the following events: * lttng_ust_cyg_profile_fast:func_entry diff --git a/tracetools_analysis/tracetools_analysis/processor/ros2.py b/tracetools_analysis/tracetools_analysis/processor/ros2.py index d732442..93f999a 100644 --- a/tracetools_analysis/tracetools_analysis/processor/ros2.py +++ b/tracetools_analysis/tracetools_analysis/processor/ros2.py @@ -23,9 +23,9 @@ from . import EventMetadata from ..data_model.ros import RosDataModel -class Ros2Processor(EventHandler): +class Ros2Handler(EventHandler): """ - ROS 2-aware event processing/handling class implementation. + ROS 2-aware event handling class implementation. Handles a trace's events and builds a model with the data. """