Implement tracing integration
This commit is contained in:
parent
bd0f23ba37
commit
f0cfc13af5
2 changed files with 10 additions and 2 deletions
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
<depend>launch</depend>
|
<depend>launch</depend>
|
||||||
<depend>launch_ros</depend>
|
<depend>launch_ros</depend>
|
||||||
|
<depend>tracetools_trace</depend>
|
||||||
|
|
||||||
<test_depend>ament_copyright</test_depend>
|
<test_depend>ament_copyright</test_depend>
|
||||||
<test_depend>ament_flake8</test_depend>
|
<test_depend>ament_flake8</test_depend>
|
||||||
|
|
|
@ -8,6 +8,7 @@ from launch.action import Action
|
||||||
from launch.event import Event
|
from launch.event import Event
|
||||||
from launch.event_handlers import OnShutdown
|
from launch.event_handlers import OnShutdown
|
||||||
from launch.launch_context import LaunchContext
|
from launch.launch_context import LaunchContext
|
||||||
|
from tracetools_trace.tools import lttng
|
||||||
from tracetools_trace.tools import names
|
from tracetools_trace.tools import names
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,9 +42,15 @@ class Trace(Action):
|
||||||
self._setup()
|
self._setup()
|
||||||
|
|
||||||
def _setup(self):
|
def _setup(self):
|
||||||
# TODO
|
|
||||||
print('setting up tracing!')
|
print('setting up tracing!')
|
||||||
|
lttng.lttng_setup(
|
||||||
|
self.__session_name,
|
||||||
|
self.__path,
|
||||||
|
ros_events=self.__events_ust,
|
||||||
|
kernel_events=self.__events_kernel)
|
||||||
|
lttng.lttng_start(self.__session_name)
|
||||||
|
|
||||||
def _destroy(self, event: Event, context: LaunchContext):
|
def _destroy(self, event: Event, context: LaunchContext):
|
||||||
# TODO
|
|
||||||
print('destroying tracing session!')
|
print('destroying tracing session!')
|
||||||
|
lttng.lttng_stop(self.__session_name)
|
||||||
|
lttng.lttng_destroy(self.__session_name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue