Mercurial > hg > Members > nobuyasu > jungle_benchmark
comparison stress_write_jungle.rb @ 11:223af50e60d5
Added some files
author | Nobuyasu |
---|---|
date | Mon, 20 Jan 2014 02:59:12 +0900 |
parents | f94fc7812cd8 |
children |
comparison
equal
deleted
inserted
replaced
10:f94fc7812cd8 | 11:223af50e60d5 |
---|---|
9 sleepTime = schedule - time | 9 sleepTime = schedule - time |
10 sleep(sleepTime) | 10 sleep(sleepTime) |
11 | 11 |
12 r = Benchmark.measure { | 12 r = Benchmark.measure { |
13 count = ARGV[1].to_i | 13 count = ARGV[1].to_i |
14 uri = URI.parse('http://bldsv12.cr.ie.u-ryukyu.ac.jp:8080/editMessage?bname=hello%20world&uuid=0') | 14 # uri = URI.parse('http://bldsv12.cr.ie.u-ryukyu.ac.jp:8080/editMessage?bname=hello%20world&uuid=0') |
15 uri = URI.parse('http://mass48.cs.ie.u-ryukyu.ac.jp:8080/editMessage?bname=hello%20world&uuid=0') | |
15 count.times {|i| | 16 count.times {|i| |
16 res = Net::HTTP.post_form(uri, {:author =>'oshiro', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>"hogehoge #{i}"}) | 17 res = Net::HTTP.post_form(uri, {:author =>'oshiro', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>"hogehoge #{i}"}) |
17 } | 18 } |
18 } | 19 } |
19 puts r.real | 20 puts r.real |