def write_check(): big_arrays() log_pairs = build_log_info(DIRPATH) for log_pair in log_pairs: logged_mem_mb = log_pair['final_memory MB'] - \ log_pair['initial_memory MB'] print '******************' print "logged_mem_mb", logged_mem_mb print "actual_mem MB", log_pair['actual_mem MB'] if not logged_mem_mb == 0: print "diff %", ((logged_mem_mb - log_pair['actual_mem MB']) / log_pair['actual_mem MB'] * 100.) shutil.rmtree(DIRPATH)
def create_meta_log(): path = os.path.join(eqrm_data_home(), 'test_national', 'memory_output') # 'memory_output_riskB') log_pairs = build_log_info(path) #print "len(log_pairs)", len(log_pairs) log_pairs_estimate_mem(log_pairs) mem_pairs = [] for alog in log_pairs: just_mem = {} for key, value in alog.iteritems(): if "mem" in key: just_mem[key] = value mem_pairs.append(just_mem) write_meta_log(mem_pairs, os.path.join(path, 'meta_log.csv'))
def log_estimate_memory_use(path): log_pairs = build_log_info(path) log_pairs_estimate_mem(log_pairs)
def create_meta_log(path=None): if path == None: path = os.path.join(eqrm_data_home(), 'test_national', 'reduce_mem') log_pairs = build_log_info(path) log_pairs_estimate_mem(log_pairs)