diff --git a/figures/energy_perf_bar.py b/figures/energy_perf_bar.py index d5baac5..3738684 100644 --- a/figures/energy_perf_bar.py +++ b/figures/energy_perf_bar.py @@ -35,10 +35,10 @@ def plot_energy_perf_bar(args, threshold_list, budget): # finding points with 3% threshold of target budget/inefficiency thresh = 3 - energy_bar_data = [ [] for thresh in threshold_list] - performance_bar_data = [ [] for thresh in threshold_list] - energy_bar_data_nocost = [ [] for thresh in threshold_list] - performance_bar_data_nocost = [ [] for thresh in threshold_list] + energy_bar_data = [ [] for thr in threshold_list] + performance_bar_data = [ [] for thr in threshold_list] + energy_bar_data_nocost = [ [] for thr in threshold_list] + performance_bar_data_nocost = [ [] for thr in threshold_list] print budget for threshold_index, cluster_thresh in enumerate(threshold_list): @@ -268,8 +268,8 @@ def plot_abs_energy_time_bar(args, budget_list, cluster_thresh, perf_cost, energ # finding points with 3% threshold of target budget/inefficiency thresh = 3 - energy_bar_data = [ [] for thresh in budget_list] - performance_bar_data = [ [] for thresh in budget_list] + energy_bar_data = [ [] for thr in budget_list] + performance_bar_data = [ [] for thr in budget_list] for budget_index, budget in enumerate(budget_list): data = [] for bmark in benchmarks: diff --git a/figures/notuning_wtuning.py b/figures/notuning_wtuning.py index 740917e..864e925 100644 --- a/figures/notuning_wtuning.py +++ b/figures/notuning_wtuning.py @@ -84,7 +84,7 @@ def energy_time(args, budget_list, cluster_thresh, perf_cost, energy_cost): print "Inefficiency Budget: "+str(budget)+" Benchmark: "+bmark aggr_opt_point, energy_notuning, performance_notuning = get_no_tuning_energy_performance(args, budget, bmark) - print "no.tuning: performance (ms): "+str(performance_notuning)+" energy(mJ): "+str(energy_notuning) + #print "no.tuning: performance (ms): "+str(performance_notuning)+" energy(mJ): "+str(energy_notuning) bmarkDirPath = os.path.join(os.path.join(dir_path, "per_sample_data"), bmark) frontiers_file = os.path.join(bmarkDirPath, "per_sample_frontiers.json") @@ -180,8 +180,8 @@ def energy_time(args, budget_list, cluster_thresh, perf_cost, energy_cost): performance += get_performance(frontiers_data,optimal_point[0], optimal_point[1], idx) aggr_energy += get_energy(frontiers_data, aggr_opt_point["cpu_freq"], aggr_opt_point["mem_freq"], idx) aggr_performance += get_performance(frontiers_data, aggr_opt_point["cpu_freq"], aggr_opt_point["mem_freq"], idx) - if aggr_energy < energy: - print "unexpected!" +# if aggr_energy < energy: +# print "unexpected!" # print "("+str(optimal_point[0])+", "+str(optimal_point[1])+", "+str(energy)+", "+str(performance)+") "+"("+str(aggr_opt_point["cpu_freq"])+", "+str(aggr_opt_point["mem_freq"])+", "+str(aggr_energy)+", "+str(aggr_performance)+") --- " + str((energy - aggr_energy) * 100 / aggr_energy) +" " +str((performance - aggr_performance) * 100 / aggr_performance) if index < len(samplepoints): if idx == samplepoints[index]-2: @@ -218,8 +218,9 @@ def energy_time(args, budget_list, cluster_thresh, perf_cost, energy_cost): performance_data[budget_index].append(performance) aggr_energy = (aggr_energy + (num_transitions * energy_cost))/1e6 aggr_performance = (aggr_performance +(num_transitions * perf_cost))/1e6 - print "no.tuning(cum): performance (ms): "+str(aggr_performance)+"energy(mJ): "+str(aggr_energy) - print "w.tuning: performance (ms): "+str(performance)+" energy(mJ): "+str(energy) + " "+ str((energy - aggr_energy) * 100 / aggr_energy) +"% " +str((performance - aggr_performance) * 100 / aggr_performance)+"%\n" + #print "no.tuning(cum): performance (ms): "+str(aggr_performance)+"energy(mJ): "+str(aggr_energy) + #print "w.tuning: performance (ms): "+str(performance)+" energy(mJ): "+str(energy) + " "+ str((energy - aggr_energy) * 100 / aggr_energy) +"% " +str((performance - aggr_performance) * 100 / aggr_performance)+"%\n" + print "w.tuning: energy: "+ str(((energy - aggr_energy) * 10000 / aggr_energy)/100) +"% execution time:" +str(((performance - aggr_performance) * 10000 / aggr_performance)/100)+"%\n" def main(argv): args = parse(argv) diff --git a/figures/stable_length_box_thresholds.py b/figures/stable_length_box_thresholds.py index 343bd3f..4019559 100644 --- a/figures/stable_length_box_thresholds.py +++ b/figures/stable_length_box_thresholds.py @@ -23,7 +23,7 @@ def plot_stable_length_box(args, threshold_list, budget_list): # finding points with 3% threshold of target budget/inefficiency thresh = 3 for bmark in benchmarks: - box_data = [ [] for thresh in threshold_list] + box_data = [ [] for thr in threshold_list] for threshold_index, cluster_thresh in enumerate(threshold_list): data = [] for budget in budget_list: diff --git a/figures/stable_line.py b/figures/stable_line.py index fc79699..ee9e7fa 100644 --- a/figures/stable_line.py +++ b/figures/stable_line.py @@ -411,7 +411,7 @@ def plot_stable_length_box_across_thresholds(args, threshold_list, budget): # finding points with 3% threshold of target budget/inefficiency thresh = 3 - box_data = [ [] for thresh in threshold_list] + box_data = [ [] for thr in threshold_list] for threshold_index, cluster_thresh in enumerate(threshold_list): data = [] for bmark in benchmarks: