view stress_read_5000_cassandra.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 25802bdc577d
line wrap: on
line source

#!/usr/bin/ruby

require 'net/http'
require 'benchmark'

puts Benchmark.measure {
 schedule = ARGV[0].to_i
 time = Time.now.to_i 
 sleepTime = schedule - time
 sleep(sleepTime) 

 5000.times {|i|
  Net::HTTP.get('133.13.56.60','/showBoardMessage?bname=hello%20world',8080)
 }
}