def compute_best_conf(input_file): times = clean.list_times(input_file) min_time = times[0] for val in times: if val["time"] < min_time["time"]: min_time = val return min_time
def check_increasing(outfile): if os.path.exists(outfile): times = clean.list_times(outfile) num_entries = len(times) if len(times) > 3: t0 = times[num_entries - 1]["time"] t1 = times[num_entries - 2]["time"] t2 = times[num_entries - 3]["time"] return t0 > t1 and t1 > t2 return False
def check_increasing(outfile): if os.path.exists(outfile): times = clean.list_times(outfile) num_entries = len(times) if len(times) > 3: t0 = times[num_entries-1]["time"] t1 = times[num_entries-2]["time"] t2 = times[num_entries-3]["time"] return t0 > t1 and t1 > t2 return False
def get_fastest(outfile): times = clean.list_times(outfile) max_thpt = times[0] for val in times: cur_throughput = float(val["txns"]) / float(val["time"]) max_throughput = float(max_thpt["txns"]) / float(max_thpt["time"]) if cur_throughput > max_throughput: max_thpt = val print max_thpt return max_thpt
def get_fastest(outfile): times = clean.list_times(outfile) max_thpt = times[0] for val in times: cur_throughput = float(val["txns"])/float(val["time"]) max_throughput = float(max_thpt["txns"])/float(max_thpt["time"]) if cur_throughput > max_throughput: max_thpt = val print max_thpt return max_thpt
def check_worse(input_file): if os.path.exists(input_file): times = clean.list_times(input_file) if len(times) > 2: l0 = times[len(times) - 1]["time"] l1 = times[len(times) - 2]["time"] l2 = times[len(times) - 3]["time"] if l0 > l1 and l1 > l2: return True else: return False return False
def check_worse(input_file): if os.path.exists(input_file): times = clean.list_times(input_file) if len(times) > 2: l0 = times[len(times)-1]["time"] l1 = times[len(times)-2]["time"] l2 = times[len(times)-3]["time"] if l0 > l1 and l1 > l2: return True else: return False return False