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!
on 2007-07-09 18:55
on 2007-07-09 20:54
> 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("22.214.171.124") => #<Net::Ping::External:0xb7c544e0 @port=7, @duration=nil, @warning=nil, @timeout=5, @exception=nil, @host="126.96.36.199"> 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