diff --git a/tracetools_analysis/analysis/ros_processor.py b/tracetools_analysis/analysis/ros_processor.py index 17e436c..601b2da 100644 --- a/tracetools_analysis/analysis/ros_processor.py +++ b/tracetools_analysis/analysis/ros_processor.py @@ -3,9 +3,11 @@ import sys from .lttng_models import EventMetadata, get_field, get_name + def ros_process(events): """ - Process unpickled events and create ROS model + Process unpickled events and create ROS model. + :param events (list(dict(str:str:))): the list of events :return the processor object """ @@ -13,11 +15,14 @@ def ros_process(events): processor.process_events(events) return processor + class RosProcessor(): """ ROS-aware event processing/handling class. + Handles a trace's events and builds a model with the data. """ + def __init__(self): # TODO add other stuff # Instances of callback_start for eventual matching @@ -35,7 +40,8 @@ class RosProcessor(): def process_events(self, events): """ - Process events + Process events. + :param events (list(dict(str:str))): the events to process """ for event in events: diff --git a/tracetools_analysis/conversion/ctf.py b/tracetools_analysis/conversion/ctf.py index 362d019..fd4c28f 100644 --- a/tracetools_analysis/conversion/ctf.py +++ b/tracetools_analysis/conversion/ctf.py @@ -13,7 +13,8 @@ _DISCARD = 'events_discarded' def ctf_to_pickle(trace_directory, target): """ - Load CTF trace and convert to a pickle file + Load CTF trace and convert to a pickle file. + :param trace_directory (str): the main/top trace directory :param target (Pickler): the target pickle file to write to """ @@ -50,6 +51,7 @@ def ctf_to_pickle(trace_directory, target): def _ctf_event_to_pod(ctf_event): """ Convert name, timestamp, and all other keys except those in IGNORED_FIELDS into a dictionary. + :param ctf_element: The element to convert :type ctf_element: babeltrace.Element :return: