ros2-performance icon indicating copy to clipboard operation
ros2-performance copied to clipboard

Allow and track multiple publisher to same topic

Open eliasdc opened this issue 3 years ago • 2 comments

This PR adds the ability to have nodes publishing to the same topic to the benchmark application.

This adds a node_name attribute to the header message to keep track of the source of the message. A tracking number is saved for each unique node_name. This fixes an issue where the tracking_number_counter received the same number multiple times and the calculation of the stats failed because of it.

Size and frequency is saved in a Stat object to allow different sizes and frequencies with multiple publishers.

eliasdc avatar Aug 18 '20 16:08 eliasdc

@eliasdc I want to make sure that the application performance are not affected by the change, should be able to get results tomorrow.

alsora avatar Aug 27 '20 14:08 alsora

I compared your branch and master on a RaspberryPi 4 using the 20 nodes topology "montblanc". master CPU usage is steady at 8.3%, while your branch CPU usage is steady at 11%.

I prefer to not merge the change as it is. Next week will look more into the PR and see if we can optimize it somehow.

alsora avatar Aug 28 '20 18:08 alsora