Download results back to the running machine for inspection

This commit is contained in:
R. Tyler Croy 2014-11-20 07:08:16 -08:00
parent b0598b3926
commit dc29e9057a
3 changed files with 12 additions and 4 deletions

13
baas
View File

@ -40,7 +40,7 @@ module Baas
end
end
def self.upload_scripts!(name)
def self.upload_scripts_to(name)
config = configuration.hosts[name]
dir = '~'
user = config.username
@ -52,6 +52,12 @@ module Baas
end
end
def self.download_results_from(name)
config = configuration.hosts[name]
`scp #{config.username}@#{config.hostname}:*.{csv,html} ./results/`
end
def self.run!
line_clear!
@ -70,15 +76,16 @@ module Baas
threads = []
configuration.hosts.each_key do |name|
upload_scripts!(name)
upload_scripts_to name
commands = [
"echo 'Connection created to #{name}'",
"sh run-bonnie.sh /mnt/bonnie-test 2048 #{name}",
#"sh run-bonnie.sh /mnt/bonnie-test 2048 #{name}",
].freeze
threads << Thread.new do
rexec!(name, commands)
download_results_from name
end
end

0
results/.gitkeep Normal file
View File

View File

@ -30,7 +30,8 @@ time bonnie -d $1 \
-r 1024 \
-m $3 \
-u $USER \
-q > $OUTPUT_CSV
-q > $OUTPUT_CSV \
2> /dev/null # Get rid of stderr
bon_csv2html < $OUTPUT_CSV > $OUTPUT_HTML