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
|
||||
|
||||
require File.expand_path('subscripts/common', File.dirname(__FILE__))
|
||||
require 'date'
|
||||
require "#{File.dirname(__FILE__)}/subscripts/loadParms"
|
||||
|
||||
|
@ -17,19 +18,27 @@ def figure_time_stamp()
|
|||
return DateTime.now.strftime("%Y-%m-%d_%H-%M-%S")
|
||||
end
|
||||
|
||||
Dir.chdir("/home/jeb228/LoadTesting/versions/#{@version_name}") do |path|
|
||||
@tomcat_logs_dir = "#{path}/tomcatLogs"
|
||||
if (! File.directory?(@tomcat_logs_dir))
|
||||
Dir.mkdir(@tomcat_logs_dir)
|
||||
def add_read_me()
|
||||
puts "Add a comment for the README.txt file"
|
||||
comment = STDIN.gets.strip
|
||||
return if comment.empty?
|
||||
|
||||
File.open('README.txt', "w") do |file|
|
||||
file.puts comment
|
||||
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|
|
||||
@this_logs_dir = "#{path}/#{figure_time_stamp()}"
|
||||
Dir.mkdir(@this_logs_dir)
|
||||
end
|
||||
|
||||
Dir.chdir(@this_logs_dir) do |path|
|
||||
system('cp ~/LoadTesting/tomcat/logs/* .')
|
||||
system("cp #{@home}/tomcat/logs/* .")
|
||||
add_read_me()
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue