view stress_write_jungle.rb @ 0:f049a3340d2c

added some files
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Wed, 17 Jul 2013 08:07:00 +0900
parents
children f94fc7812cd8
line wrap: on
line source

#!/usr/bin/ruby

require 'net/http'
require 'benchmark'

r = Benchmark.measure {
 schedule = ARGV[0].to_i
 time = Time.now.to_i 
 sleepTime = schedule - time
 sleep(sleepTime) 
 count = ARGV[1].to_i
 count.times {|i|
  Net::HTTP.get('133.13.62.3','/editMessage?bname=hello%20world&uuid=0&author=oshiro&key=0&msg=hogehoge',8080)
 }
}
puts r.real