Refine the load-testing scripts
This commit is contained in:
parent
d6fb302e2b
commit
a8908964f2
1 changed files with 15 additions and 6 deletions
|
@ -10,6 +10,7 @@ directory, for possible inspection later.
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
=end
|
=end
|
||||||
|
|
||||||
|
require File.expand_path('subscripts/common', File.dirname(__FILE__))
|
||||||
require 'date'
|
require 'date'
|
||||||
require "#{File.dirname(__FILE__)}/subscripts/loadParms"
|
require "#{File.dirname(__FILE__)}/subscripts/loadParms"
|
||||||
|
|
||||||
|
@ -17,19 +18,27 @@ def figure_time_stamp()
|
||||||
return DateTime.now.strftime("%Y-%m-%d_%H-%M-%S")
|
return DateTime.now.strftime("%Y-%m-%d_%H-%M-%S")
|
||||||
end
|
end
|
||||||
|
|
||||||
Dir.chdir("/home/jeb228/LoadTesting/versions/#{@version_name}") do |path|
|
def add_read_me()
|
||||||
@tomcat_logs_dir = "#{path}/tomcatLogs"
|
puts "Add a comment for the README.txt file"
|
||||||
if (! File.directory?(@tomcat_logs_dir))
|
comment = STDIN.gets.strip
|
||||||
Dir.mkdir(@tomcat_logs_dir)
|
return if comment.empty?
|
||||||
|
|
||||||
|
File.open('README.txt', "w") do |file|
|
||||||
|
file.puts comment
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@tomcat_logs_dir = version_file('tomcatLogs')
|
||||||
|
if (! File.directory?(@tomcat_logs_dir))
|
||||||
|
Dir.mkdir(@tomcat_logs_dir)
|
||||||
|
end
|
||||||
|
|
||||||
Dir.chdir(@tomcat_logs_dir) do |path|
|
Dir.chdir(@tomcat_logs_dir) do |path|
|
||||||
@this_logs_dir = "#{path}/#{figure_time_stamp()}"
|
@this_logs_dir = "#{path}/#{figure_time_stamp()}"
|
||||||
Dir.mkdir(@this_logs_dir)
|
Dir.mkdir(@this_logs_dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
Dir.chdir(@this_logs_dir) do |path|
|
Dir.chdir(@this_logs_dir) do |path|
|
||||||
system('cp ~/LoadTesting/tomcat/logs/* .')
|
system("cp #{@home}/tomcat/logs/* .")
|
||||||
|
add_read_me()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue