You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, ros2 trace cannot be used in scripts or in non-interactive environments. After running the ros2 trace command, the user needs to press start to start tracing and then enter again to stop tracing. We could provide start and stop sub-commands to do that instead. Also, sub-commands like pause and resume could help with #44:
$ ros2 trace start ... # Same args as 'ros2 trace' except for a mandatory explicit session name, but starts tracing and returns immediately
# ... wait until initialization is done
$ ros2 trace pause <session_name> # Pauses tracing and returns immediately
# ... some time later
$ ros2 trace resume <session_name> # Starts tracing again and returns immediately
$ ros2 trace stop <session_name> # Stops tracing and returns immediately
Here is a comparison with the lttng commands:
ros2 trace start ...: equivalent to configuring the tracing session (session name, events, etc.) and lttng start
ros2 trace pause <session_name>: equivalent to lttng stop
ros2 trace resume <session_name>: equivalent to lttng start
We could offer a ros2 trace create ..., which would configure the tracing session without starting to trace, i.e., ros2 trace start ... without lttng start. However, since there's currently no point in configuring the tracing session without also starting to trace, this wouldn't really be useful. We can always add it later on anyway.
The implementation wouldn't be too bad. We already have separate setup(), start(), stop(), and destroy() functions in tracetools_trace/tracetools_trace/tools/lttng_impl.py.
Finally, note that lttng's start/stop/destroy don't require a session name argument, since the "current" session name is written to ~/.lttngrc: https://lttng.org/man/7/lttng-concepts/v2.13/#doc-_current_recording_session. This isn't the case when tracing using the LTTng Python bindings, but we could re-implement this functionality (e.g., write the current session name to ~/.ros/tracing/.rc).
The text was updated successfully, but these errors were encountered:
Currently,
ros2 trace
cannot be used in scripts or in non-interactive environments. After running theros2 trace
command, the user needs to press start to start tracing and then enter again to stop tracing. We could providestart
andstop
sub-commands to do that instead. Also, sub-commands likepause
andresume
could help with #44:Here is a comparison with the
lttng
commands:ros2 trace start ...
: equivalent to configuring the tracing session (session name, events, etc.) andlttng start
ros2 trace pause <session_name>
: equivalent tolttng stop
ros2 trace resume <session_name>
: equivalent tolttng start
ros2 trace stop <session_name>
: equivalent to[lttng stop &&] lttng destroy
We could offer a
ros2 trace create ...
, which would configure the tracing session without starting to trace, i.e.,ros2 trace start ...
withoutlttng start
. However, since there's currently no point in configuring the tracing session without also starting to trace, this wouldn't really be useful. We can always add it later on anyway.The implementation wouldn't be too bad. We already have separate
setup()
,start()
,stop()
, anddestroy()
functions intracetools_trace/tracetools_trace/tools/lttng_impl.py
.Finally, note that
lttng
'sstart
/stop
/destroy
don't require a session name argument, since the "current" session name is written to~/.lttngrc
: https://lttng.org/man/7/lttng-concepts/v2.13/#doc-_current_recording_session. This isn't the case when tracing using the LTTng Python bindings, but we could re-implement this functionality (e.g., write the current session name to~/.ros/tracing/.rc
).The text was updated successfully, but these errors were encountered: