Mercurial > hg > Members > nobuyasu > jungle_benchmark
view distributed/test_cluster_get.rb @ 25:726b2deadbe3
calc_sd.rb
author | Nobuyasu |
---|---|
date | Fri, 31 Jan 2014 04:51:45 +0900 |
parents | d6d3b7180e6d |
children |
line wrap: on
line source
#!/usr/bin/ruby require 'net/http' require 'uri' require 'benchmark' require '/home/mass/share/student/k128576/jungle_benchmark/distributed/get_node_list.rb' include GetNodeList filename = "/home/mass/share/student/k128576/jungle_benchmark/distributed/nodes.txt" if ARGV.size() > 0 then filename = ARGV[0] end nodelist = get_node_list(filename) count=0 nodelist.each { |nodename| puts "connect " + nodename begin ret = Net::HTTP.get(nodename,'/showBoardMessage?bname=hello%20world',8080) count = count + 1 rescue Errno::ECONNREFUSED puts "Failed : get request to " + nodename end } puts "connect success : " + count.to_s