require 'druby' obj = DRuby::Client.new('localhost', '9000') N = 10000 start_time = Time.now (1..N).each do |i| obj.foo(i) end end_time = Time.now total_time = end_time - start_time puts "Total time: #{total_time}" puts "Messages per second: #{N/total_time}" puts "You should see the number #{N}:" puts obj.bar() puts "You should see the numbers 1, 2, and 3 on separate lines:" obj.each do |i| puts i end puts "You should now see a RuntimeError get thrown:" obj.throw_exception()