Testing publish and subscribe transmission delay.

2 posts / 0 new
Last post
Last seen: 5 months 3 weeks ago
Joined: 08/11/2019
Posts: 28
Testing publish and subscribe transmission delay.


I try to test the transmission delay from publish to subscribe,

so I set two parameters,

one is SendTime another is ReceiveTime, use DDS_DomainParticipant_get_current_time,

the SendTime I put in publisher, 

and ReceiveTime I put in publisher,

I get the delay = ReceiveTime - SendTime but it is not correct, 

Is there and suggestions for test transmission delay?



Last seen: 8 months 1 week ago
Joined: 02/11/2016
Posts: 143

Hello Kay,

There's a latency test supplied with RTI.

Generally speaking, it's problematic to measure latency the way you did because you're assuming the clocks of different computers is synchronized (unless your publisher and subscriber are both on the same computer, in which case you may still be inaccurate, depending on your OS).

To solve the synchronization problem it's normal to measure latency using round trip time (sending a message back and forth, measuring how long that took, and dividing by two).

Clearly this will not measure ONLY transmission time (as time will pass from when the message is "sent" from the original publisher and until it starts transmitting, time will pass from the moment the message reaches the first subscribers port and until the message is handled by your receiving application, time will pass between when the message is "resent" until it starts transmitting again, and time will pass between the moment it reaches the original station and until it is processed (so that you can calculate Round Trip Time).

This is not even taking into account how throughput affects latency (and oh boy, it affects latency a lot).

To make performance tests a bit better, RTI has relatively good Performance Tests (which you can use to measure latency and throughput that your infrastructure [os, network setup, hardware, possibly also the choice of programming language and, if relevant, jvm] and QoS settings support).


Good luck,