changeset 8:d0f106599a6d

fix stress_write
author Daichi TOMA
date Sat, 13 Jul 2013 01:29:56 +0900
parents 0c3201893f1a
children 678c260c0dc7
files loop_qsub.sh stress_read.rb stress_write.rb
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/loop_qsub.sh	Tue Jul 02 18:17:11 2013 +0900
+++ b/loop_qsub.sh	Sat Jul 13 01:29:56 2013 +0900
@@ -6,7 +6,7 @@
 for i in `seq $start $finish`
 do
  echo "current count = $i"
- qsub -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 stress_write.sh
+ qsub -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 stress_read.sh
  while [ "x`qstat`" != "x" ]
  do
   echo "waiting for job to complete"
--- a/stress_read.rb	Tue Jul 02 18:17:11 2013 +0900
+++ b/stress_read.rb	Sat Jul 13 01:29:56 2013 +0900
@@ -12,7 +12,7 @@
 
   count = ARGV[1].to_i
   count.times {|i|
-    Net::HTTP.get('133.13.56.3','/showBoardMessage?bname=hello%20world',3000)
+    Net::HTTP.get('133.13.56.3','/showBoardMessage?bname=hello%20world',8080)
   }
 }
 puts tms.real
--- a/stress_write.rb	Tue Jul 02 18:17:11 2013 +0900
+++ b/stress_write.rb	Sat Jul 13 01:29:56 2013 +0900
@@ -9,12 +9,12 @@
 sleepTime = schedule - time
 sleep(sleepTime) 
 
-tms = Benchmark.measure {
+r = Benchmark.measure {
   count = ARGV[1].to_i
   count.times {|i|
-   uri = URI.parse("http://133.13.56.3:3000/editMessage?bname=hello%20world&uuid=0")
-   Net::HTTP.post_form(uri, {'author' => 'shoshi', 'bname' => 'hello world', 'uuid' => '0', 'key' => '0', 'msg' => 'hogehoge'})
+    uri = URI.parse('http://133.13.56.3:8080/editMessage?bname=hello%20world&uuid=0')
+    res = Net::HTTP.post_form(uri, {:author =>'shoshi', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>'hogehoge'})
   }
 }
-puts tms.real
+puts r.real