Mercurial > hg > Members > nobuyasu > jungle_benchmark
view stress_read.rb @ 25:726b2deadbe3
calc_sd.rb
author | Nobuyasu |
---|---|
date | Fri, 31 Jan 2014 04:51:45 +0900 |
parents | 5ea96ce6a1c1 |
children |
line wrap: on
line source
#!/usr/bin/ruby require 'net/http' require 'benchmark' require 'socket' schedule = ARGV[0].to_i time = Time.now.to_i sleepTime = schedule - time sleep(sleepTime) tms = Benchmark.measure { count = ARGV[1].to_i count.times {|i| ret = Net::HTTP.get('bldsv12.cr.ie.u-ryukyu.ac.jp','/showBoardMessage?bname=hello%20world',8080) } } puts tms.real