Mercurial > hg > Members > nobuyasu > jungle_benchmark
annotate stress_write_10000.rb @ 16:704bcc773b96
Modifed capistrano file
author | Nobuyasu |
---|---|
date | Fri, 24 Jan 2014 18:09:16 +0900 |
parents | 25802bdc577d |
children |
rev | line source |
---|---|
0
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 #!/usr/bin/ruby |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 require 'net/http' |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 require 'benchmark' |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 puts Benchmark.measure { |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 schedule = ARGV[0].to_i |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 time = Time.now.to_i |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 sleepTime = schedule - time |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 #puts "sleeping ",sleepTime |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 sleep(sleepTime) |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 5000.times {|i| |
1
25802bdc577d
change ip address
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
13 ret = Net::HTTP.get('133.13.62.3','/editMessage?bname=hello%20world&uuid=0&author=shoshi&key=0&msg=hogehoge',8080) |
0
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 } |
f049a3340d2c
added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15 } |