# Latency and throughput in ROS2

**URL:** <https://discourse.openrobotics.org/t/latency-and-throughput-in-ros2/4367>\
**Category:** ROS General\
**Created:** [April 1, 2018, 10:42am UTC](https://discourse.openrobotics.org/t/latency-and-throughput-in-ros2/4367 "2018-04-01T10:42:10Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![astralien3000](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/astralien3000/32/511_2.png) [@astralien3000](https://discourse.openrobotics.org/u/astralien3000)\
**Post date:** [June 21, 2018, 9:04am UTC](https://discourse.openrobotics.org/t/latency-and-throughput-in-ros2/4367/9 "2018-06-21T09:04:09Z")

</div>

I didn’t do anything complex, but since it is an invasive way of measuring, I don’t know if it is easy to integrate into the performance\_test. [I only printed events with their timestamp on stdio](https://github.com/astralien3000/rmw_fastrtps/blob/phd_meas_latency/rmw_fastrtps_cpp/src/rmw_publish.cpp#L53), and then post processed with a python script. It is not very precise, but since I don’t want the real latency (only being able to compare the two implementations), it is ok for me. To avoid the print extra cost during the experiment, you can register the events+timestamp in a (pre-allocated) table, and print everything at the end.

---

_[View the full topic](https://discourse.openrobotics.org/t/latency-and-throughput-in-ros2/4367)._
