Mercurial > hg > Members > nobuyasu > jungle_benchmark
changeset 8:9ed378589601
Modified benchmark program
author | Nobuyasu |
---|---|
date | Sat, 11 Jan 2014 03:44:39 +0900 |
parents | 867cd5f213d3 |
children | 4fa0a48323fe |
files | distributed/loop_qsub.sh distributed/nodes_stress_write_cassandra.rb distributed/nodes_stress_write_jungle.rb distributed/stress_write_jungle.sh |
diffstat | 4 files changed, 15 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/distributed/loop_qsub.sh Sat Jan 11 03:24:53 2014 +0900 +++ b/distributed/loop_qsub.sh Sat Jan 11 03:44:39 2014 +0900 @@ -1,13 +1,14 @@ #!/bin/sh start=1 -finish=45 +finish=2 +#finish=45 for i in `seq $start $finish` do echo "current count = $i" - qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/distributed/stress_write_jungle.sh -# qsub -e /home/mass/share/student/k128576/jungle_benchmark/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/stress_read_jungle.sh + qsub -e /home/mass/share/student/k128576/jungle_benchmark/distributed/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/distributed/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/distributed/stress_write_jungle.sh +# qsub -e /home/mass/share/student/k128576/jungle_benchmark/distributed/error_log/ -o /home/mass/share/student/k128576/jungle_benchmark/distributed/log/ -v times=5000,schedule=`expr $(date +%s) + 5` -l nodes=$i:ppn=4 /home/mass/share/student/k128576/jungle_benchmark/distributed/stress_read_jungle.sh while [ "x`qstat`" != "x" ] do echo "waiting for job to complete"
--- a/distributed/nodes_stress_write_cassandra.rb Sat Jan 11 03:24:53 2014 +0900 +++ b/distributed/nodes_stress_write_cassandra.rb Sat Jan 11 03:44:39 2014 +0900 @@ -2,7 +2,8 @@ require 'net/http' require 'benchmark' -require './get_node_name.rb' +require 'uri' +require '/home/mass/share/student/k128576/jungle_benchmark/distributed/get_node_name.rb' include GetNodeName schedule = ARGV[0].to_i @@ -10,14 +11,13 @@ sleepTime = schedule - time sleep(sleepTime) -nodename = get_node_name("nodes.txt") - -tms = Benchmark.measure { +nodename = get_node_name("/home/mass/share/student/k128576/jungle_benchmark/distributed/nodes.txt") +r = Benchmark.measure { count = ARGV[1].to_i - uri = URI.parse('http://'+nodename+':8080/editMessage?bname=hello%20world&uuid=13814000-1dd2-11b2-93d6-02864ec060b6') + uri = URI.parse('http://'+nodename.chomp+':8080/editMessage?bname=hello%20world&uuid=13814000-1dd2-11b2-93d6-02864ec060b6') count.times {|i| res = Net::HTTP.post_form(uri, {:author =>'oshiro', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>"fugafuga #{i}"}) } } -puts tms.real +puts r.real
--- a/distributed/nodes_stress_write_jungle.rb Sat Jan 11 03:24:53 2014 +0900 +++ b/distributed/nodes_stress_write_jungle.rb Sat Jan 11 03:44:39 2014 +0900 @@ -3,7 +3,7 @@ require 'net/http' require 'uri' require 'benchmark' -require './get_node_name.rb' +require '/home/mass/share/student/k128576/jungle_benchmark/distributed/get_node_name.rb' include GetNodeName schedule = ARGV[0].to_i @@ -11,12 +11,12 @@ sleepTime = schedule - time sleep(sleepTime) -nodename = get_node_name("nodes.txt") +nodename = get_node_name("/home/mass/share/student/k128576/jungle_benchmark/distributed/nodes.txt") r = Benchmark.measure { count = ARGV[1].to_i + uri = URI.parse('http://' << nodename.chomp << ':8080/editMessage?bname=hello%20world&uuid=0') count.times {|i| - uri = URI.parse('http://'+nodename+':8080/editMessage?bname=hello%20world&uuid=0') - res = Net::HTTP.post_form(uri, {:author =>'shoshi', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>"hogehoge #{i}"}) + res = Net::HTTP.post_form(uri, {:author =>'oshiro', :bname =>'hello world', :uuid =>'0', :key =>'0', :msg =>"hogehoge #{i}"}) } } puts r.real
--- a/distributed/stress_write_jungle.sh Sat Jan 11 03:24:53 2014 +0900 +++ b/distributed/stress_write_jungle.sh Sat Jan 11 03:44:39 2014 +0900 @@ -4,7 +4,7 @@ #PBS -N write_jungle #PBS -l walltime=00:05:00 -script=/home/mass/share/student/k128576/jungle_benchmark/nodes_stress_write_jungle.rb +script=/home/mass/share/student/k128576/jungle_benchmark/distributed/nodes_stress_write_jungle.rb function run() { while read serv