0

我想知道 NTP 是否可用于测量分布式计算环境中发布者和订阅者之间的延迟。在所有节点上都配置了 NTP。我能够单独收集统计数据。如何使用 NTP 准确测量发布者和 s 之间的延迟

4

1 回答 1

1

You can use NTP to synchronize the machines in a network. Then you use the local time i.e. System.currentTimeMillis() to get the time locally.

One way to make the timing easier is to send the time in the message. This way you can compare the time sent with the time received to get the latency.

Note: this is only accurate to milli-seconds. For greater accuracy you need special infrastructure.

于 2013-01-28T10:57:59.420 回答