Forum: Ruby network latency

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
C0dd31d9c6d343ca4ec4428a7a76ace7?d=identicon&s=25 K. R. (ribit)
on 2007-07-09 18:55
Hi @ all
Can somebody explain me, how can I measure the latency of my network
with a ruby app? Does in the internet exist any websites about network

thanks for your solution!
15a5043475dac9278ae75efb4c71f1f6?d=identicon&s=25 Felix Windt (Guest)
on 2007-07-09 20:54
(Received via mailing list)
> websites about network theme?
> thanks for your solution!
> --
> Posted via

The easiest thing would probably be to use the net-ping library and ping
other network device and then look at the response time:

irb(main):001:0> require 'net/ping'
=> true
irb(main):002:0> p ="")
=> #<Net::Ping::External:0xb7c544e0 @port=7, @duration=nil,
@timeout=5, @exception=nil, @host="">
=> true
irb(main):004:0> p.duration
=> 0.088548
irb(main):005:0> exit

I'm not sure I understand the second question.


This topic is locked and can not be replied to.