Fix lint errors
This commit is contained in:
parent
475dbbd107
commit
9b36c1513c
2 changed files with 11 additions and 3 deletions
|
@ -3,9 +3,11 @@
|
||||||
import sys
|
import sys
|
||||||
from .lttng_models import EventMetadata, get_field, get_name
|
from .lttng_models import EventMetadata, get_field, get_name
|
||||||
|
|
||||||
|
|
||||||
def ros_process(events):
|
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
|
:param events (list(dict(str:str:))): the list of events
|
||||||
:return the processor object
|
:return the processor object
|
||||||
"""
|
"""
|
||||||
|
@ -13,11 +15,14 @@ def ros_process(events):
|
||||||
processor.process_events(events)
|
processor.process_events(events)
|
||||||
return processor
|
return processor
|
||||||
|
|
||||||
|
|
||||||
class RosProcessor():
|
class RosProcessor():
|
||||||
"""
|
"""
|
||||||
ROS-aware event processing/handling class.
|
ROS-aware event processing/handling class.
|
||||||
|
|
||||||
Handles a trace's events and builds a model with the data.
|
Handles a trace's events and builds a model with the data.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# TODO add other stuff
|
# TODO add other stuff
|
||||||
# Instances of callback_start for eventual matching
|
# Instances of callback_start for eventual matching
|
||||||
|
@ -35,7 +40,8 @@ class RosProcessor():
|
||||||
|
|
||||||
def process_events(self, events):
|
def process_events(self, events):
|
||||||
"""
|
"""
|
||||||
Process events
|
Process events.
|
||||||
|
|
||||||
:param events (list(dict(str:str))): the events to process
|
:param events (list(dict(str:str))): the events to process
|
||||||
"""
|
"""
|
||||||
for event in events:
|
for event in events:
|
||||||
|
|
|
@ -13,7 +13,8 @@ _DISCARD = 'events_discarded'
|
||||||
|
|
||||||
def ctf_to_pickle(trace_directory, target):
|
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 trace_directory (str): the main/top trace directory
|
||||||
:param target (Pickler): the target pickle file to write to
|
: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):
|
def _ctf_event_to_pod(ctf_event):
|
||||||
"""
|
"""
|
||||||
Convert name, timestamp, and all other keys except those in IGNORED_FIELDS into a dictionary.
|
Convert name, timestamp, and all other keys except those in IGNORED_FIELDS into a dictionary.
|
||||||
|
|
||||||
:param ctf_element: The element to convert
|
:param ctf_element: The element to convert
|
||||||
:type ctf_element: babeltrace.Element
|
:type ctf_element: babeltrace.Element
|
||||||
:return:
|
:return:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue