def log_path_process(filepath): ''' log_path_process function, to collect GC efficiency for one directories @param fnames, the log names with path @param size_list, the average size change for each GC @param time_list, the time used for each GC ''' time_list = [] size_list = [] for root, dirs, files in os.walk(filepath): fnames = [os.path.join(root, f) for f in files] for filename in fnames: (size_list, time_list) = log_file_process(filename) resultname = filename + "_result" size_list = write_to_file.writetofile(size_list, resultname) time_list = write_to_file.writetofile(time_list, resultname)
def log_path_process(filepath): ''' log_path_process function, to collect GC efficiency for one directories @param fnames, the log names with path @param size_list, the average size change for each GC @param time_list, the time used for each GC ''' gc = [] time_mu = [] time_gc = [] major_gc = [] cycles_mu = [] cycles_gc = [] instructions_mu = [] instructions_gc = [] misses_mu = [] misses_gc = [] time = [] for root, dirs, files in os.walk(filepath): fnames = [os.path.join(root, f) for f in files] for filename in fnames: (gc, time_mu, time_gc, major_gc, cycles_mu, cycles_gc, \ instructions_mu, instructions_gc, misses_mu, misses_gc, time) \ = log_file_process(filename) resultname = filename + "_result" gc = write_to_file.writetofile(gc, resultname) time_mu = write_to_file.writetofile(time_mu, resultname) time_gc = write_to_file.writetofile(time_gc, resultname) major_gc = write_to_file.writetofile(major_gc, resultname) cycles_mu = write_to_file.writetofile(cycles_mu, resultname) cycles_gc = write_to_file.writetofile(cycles_gc, resultname) instructions_mu = write_to_file.writetofile(instructions_mu, resultname) instructions_gc = write_to_file.writetofile(instructions_gc, resultname) misses_mu = write_to_file.writetofile(misses_mu, resultname) misses_gc = write_to_file.writetofile(misses_gc, resultname) time = write_to_file.writetofile(time, resultname)