annotate stress_read_jungle.rb @ 16:704bcc773b96

Modifed capistrano file
author Nobuyasu
date Fri, 24 Jan 2014 18:09:16 +0900
parents 25802bdc577d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 tms = 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 sleep(sleepTime)
f049a3340d2c added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
f049a3340d2c added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 count = ARGV[1].to_i
f049a3340d2c added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 count.times {|i|
1
25802bdc577d change ip address
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
14 Net::HTTP.get('133.13.62.3','/showBoardMessage?bname=hello%20world',8080)
0
f049a3340d2c added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 }
f049a3340d2c added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 }
f049a3340d2c added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 puts tms.real
f049a3340d2c added some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18