Mercurial > hg > Members > shoshi > jungle_benchmark_script
diff stress_read_cassandra.rb @ 0:28b900ca0be8 default tip
hg init
author | Shoshi TAMAKI |
---|---|
date | Mon, 11 Mar 2013 15:05:24 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stress_read_cassandra.rb Mon Mar 11 15:05:24 2013 +0900 @@ -0,0 +1,18 @@ +#!/usr/bin/ruby + +require 'net/http' +require 'benchmark' + +tms = 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.56.174','/showMessage?bname=hello%20world',8080) + } +} +puts tms.real +