110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
# File 'lib/testing_memory/testing_memory.rb', line 110
def check_memory_loop
start_time = Time.now
$testing_memory_log.info(Params['testing_title'])
total_files = Params['total_created_directories']*Params['total_files_in_dir']
$testing_memory_log.info("Start check all files:#{total_files} are indexed")
Params.get_init_info_messages.each { |msg|
$testing_memory_log.info(msg)
}
email_report = generate_mem_report
loop {
sleep(Params['memory_count_delay'])
email_report += generate_mem_report
email_report += "indexed files:#{$indexed_file_count}\n"
$testing_memory_log.info("indexed files:#{$indexed_file_count}")
puts("indexed files:#{$indexed_file_count}")
if total_files == $indexed_file_count
stop_time = Time.now
email_report += "\nAt this point all files are indexed. No mem changes should occur\n"
$testing_memory_log.info("Total indexing time = #{stop_time.to_i - start_time.to_i}[S]")
$testing_memory_log.info("\nAt this point all files are indexed. No mem changes should occur\n")
loop {
sleep(Params['memory_count_delay'])
email_report += generate_mem_report
}
end
}
end
|