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

Add timestamp to rmw_publish tracepoint #694

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

cwecht
Copy link
Contributor

@cwecht cwecht commented May 15, 2023

Depends on ros2/ros2_tracing#74
For some background: ros2/ros2_tracing#73

Question: Has write_w_timestamp + Time_t::now any drawbacks if compared with using plain write?

@MiguelCompany
Copy link
Collaborator

@cwecht Functionally, there are no drawbacks.
Semantically, there might be one issue if we want the tracepoint to be as close to the network/transport as possible (as stated in ros2/ros2_tracing#73 (comment))

Depending on the QoS settings, there might be a non-negligible blocking of the calling thread before the sample is added to the writer's history. Calling write will set source_timestamp to the time after that block

@cwecht
Copy link
Contributor Author

cwecht commented May 16, 2023

I think the proximity of the tracepoint to the actual write call is not that important in this case, as we can not get any closer to the actual write operation right? For the tracing itself the timestamp passed here is not that important.
For a more precise tracing, adding tracepoints to the DDS implementation itself would be necessary, I suppose, right?

However, my original question was about using that approach having any significant impact on the behaviour of the RMW/DDS layer itself. But I take from you anwser @MiguelCompany that there is no differing behaviour to be expected, right?

@MiguelCompany
Copy link
Collaborator

there is no differing behaviour to be expected, right?

Correct. No differing behaviour other than a different source_timestamp being notified on the subscription.

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

lgtm

@mjcarroll mjcarroll merged commit ba2e66b into ros2:rolling Jan 23, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants