Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create start/pause/resume/stop sub-commands for 'ros2 trace' #70

Conversation

christophebedard
Copy link
Member

Closes #68

That adds the following sub-commands to ros2 trace as "verbs":

  • ros2 trace start: configure tracing session and start tracing
  • ros2 trace pause: stop tracing, without removing tracing session
  • ros2 trace resume: start tracing again
  • ros2 trace stop: stop tracing and destroy tracing session

The goal is to provide non-interactive & finer-grained ways to control tracing. For example, this could be used in scripts. It could also be used for long-term tracing (related to #44): users can trace the first 10-30 seconds to collect initialization information, then pause, and then resume tracing again later on.

Example:

$ ros2 trace start my_session
UST tracing enabled (35 events)
kernel tracing disabled
context (3 fields)
writing tracing session to: /home/user/.ros/tracing/my_session
$ ros2 trace pause my_session
$ ros2 trace resume my_session
$ ros2 trace stop my_session

@christophebedard christophebedard added the enhancement New feature or request label Apr 24, 2023
@christophebedard christophebedard self-assigned this Apr 24, 2023
@christophebedard christophebedard force-pushed the christophebedard/ros2-trace-create-start-pause-resume-stop-sub-commands branch from f7cda2d to 9297d0f Compare April 24, 2023 20:07
@christophebedard christophebedard marked this pull request as ready for review May 2, 2023 22:50
@christophebedard christophebedard requested a review from mjcarroll May 2, 2023 22:50
@christophebedard christophebedard force-pushed the christophebedard/ros2-trace-create-start-pause-resume-stop-sub-commands branch from 9297d0f to 353f609 Compare June 9, 2023 18:48
@christophebedard
Copy link
Member Author

@mjcarroll friendly ping

Copy link
Member

@mjcarroll mjcarroll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one copyright nit

ros2trace/ros2trace/verb/__init__.py Show resolved Hide resolved
@christophebedard
Copy link
Member Author

christophebedard commented Jul 10, 2023

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@christophebedard
Copy link
Member Author

Thanks for the review.

CI looks good, so let's go.

@christophebedard christophebedard merged commit 0d9883c into rolling Jul 10, 2023
@christophebedard christophebedard deleted the christophebedard/ros2-trace-create-start-pause-resume-stop-sub-commands branch July 10, 2023 17:44
@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/ros-2-jazzy-jalisco-released/37862/9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide non-interactive 'ros2 trace start/pause/resume/stop' commands
3 participants