Network latency

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
theme?

thanks for your solution!

websites about network theme?

thanks for your solution!


Posted via http://www.ruby-forum.com/.

The easiest thing would probably be to use the net-ping library and ping
the
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.new(“72.14.207.99”)
=> #<Net::Ping::External:0xb7c544e0 @port=7, @duration=nil,
@warning=nil,
@timeout=5, @exception=nil, @host=“72.14.207.99”>
irb(main):003:0> p.ping
=> true
irb(main):004:0> p.duration
=> 0.088548
irb(main):005:0> exit

I’m not sure I understand the second question.

HTH,

Felix

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs