parent
ce4390238c
commit
55c97a458e
|
@ -79,8 +79,8 @@ def main():
|
|||
marker_list = ['o', '', '', 's', '', '', 'd', '>', '<']
|
||||
marker_label_list = ["Powersave", "", "", "Userspace (Fixed ~50% Speed)", "", "", "Performance", "Interactive (System Default)", "Ondemand (Old Default)"]
|
||||
|
||||
workload = 3 # 0-3 i.e. A-B-C-E
|
||||
delay = 1 # 0-1 i.e. 0ms or lognormal
|
||||
workload = 0 # 0-3 i.e. A-B-C-E
|
||||
delay = 0 # 0-1 i.e. 0ms or lognormal
|
||||
smallsize = 12 # 8
|
||||
largesize = 12
|
||||
|
||||
|
@ -95,59 +95,60 @@ def main():
|
|||
|
||||
workload_count = len(c_energy_log_list) # they should all be the same size...
|
||||
|
||||
latency_fixed_list = latency_list[delay][workload][0:workload_count - 2]
|
||||
energy_fixed_list = energy_list[delay][workload][0:workload_count - 2]
|
||||
|
||||
#print(latency_fixed_list)
|
||||
#print(energy_fixed_list)
|
||||
|
||||
plt.plot(latency_fixed_list, energy_fixed_list, marker = 'o', color = "black", markersize = smallsize, label = "Fixed Speeds (MHz)")
|
||||
|
||||
|
||||
delay_color_list = ["blue", "red"]
|
||||
speed_list = [300, 729, 1036, 1267, 1728, 2457, 2649]
|
||||
|
||||
for delay in range(0, 2):
|
||||
|
||||
latency_fixed_list = latency_list[delay][workload][0:workload_count - 2]
|
||||
energy_fixed_list = energy_list[delay][workload][0:workload_count - 2]
|
||||
|
||||
#print(latency_fixed_list)
|
||||
#print(energy_fixed_list)
|
||||
|
||||
plt.plot(latency_fixed_list, energy_fixed_list, marker = 'o', color = delay_color_list[delay], markersize = smallsize, label = "Fixed Speeds (MHz)")
|
||||
|
||||
for i in range(workload_count - 2, workload_count):
|
||||
|
||||
plt.plot(latency_list[delay][workload][i], energy_list[delay][workload][i], marker = marker_list[i], color = delay_color_list[delay], markersize = smallsize, label = marker_label_list[i])
|
||||
|
||||
#end_for
|
||||
|
||||
# Workload A
|
||||
offset_x = [[200, 200, 200, 200, 200, 400, 400], [-500, 300, -500, 300, 300, -400, 300]]
|
||||
offset_y = [[10, 10, 10, 10, 10, -10, -10], [40, 0, -80, 0, 0, -80, 0]]
|
||||
|
||||
|
||||
# Workload B
|
||||
#offset_x = [[100, 100, 100, -600, 0, 100, -400], [150, 150, 150, -800, 150, -300, -300]]
|
||||
#offset_y = [[2, -7, 2, 3, -8, 2, 3], [4, 4, 4, -30, 4, 12, -30]]
|
||||
# Workload C
|
||||
#offset_x = [[100, 100, -100, 100, 100, 100, 100], [-400, 100, 150, 100, 100, -600, 100]]
|
||||
#offset_y = [[1, 1, 3, -5, 1, 1, 1], [-16, 3, -8, 3, 3, -16, 3]]
|
||||
# Workload E
|
||||
#offset_x = [[600, 600, 600, 800, 600, 1200, -6000], [600, 600, 600, -6000, 600, -6000, 600]]
|
||||
#offset_y = [[6, -24, 8, 6, 6, -6, -6], [10, 10, -40, -40, 10, -40, 10]]
|
||||
|
||||
for i in [0, 1, 2, 3, 4, 5, 6]:
|
||||
ax.annotate(speed_list[i], fontsize = 16, xy = (latency_fixed_list[i] + offset_x[delay][i], energy_fixed_list[i] + offset_y[delay][i]))
|
||||
#end_for
|
||||
|
||||
|
||||
#end_for
|
||||
|
||||
|
||||
# A Sat
|
||||
#offset_x = [200, 200, 200, 200, 200, 400, 400]
|
||||
#offset_y = [10, 10, 10, 10, 10, -10, -10]
|
||||
# A Un
|
||||
#offset_x = [-500, 300, -500, 300, 300, -400, 300]
|
||||
#offset_y = [40, 0, -80, 0, 0, -80, 0]
|
||||
# B Sat
|
||||
#offset_x = [100, 100, 100, -600, 0, 100, -400]
|
||||
#offset_y = [2, -7, 2, 3, -8, 2, 3]
|
||||
# B Un
|
||||
#offset_x = [150, 150, 150, -800, 150, -300, -300]
|
||||
#offset_y = [4, 4, 4, -30, 4, 12, -30]
|
||||
# C Sat
|
||||
#offset_x = [100, 100, -100, 100, 100, 100, 100]
|
||||
#offset_y = [1, 1, 3, -5, 1, 1, 1]
|
||||
# C Un
|
||||
#offset_x = [-400, 100, 150, 100, 100, -600, 100]
|
||||
#offset_y = [-16, 3, -8, 3, 3, -16, 3]
|
||||
# E Sat
|
||||
#offset_x = [600, 600, 600, 800, 600, 1200, -6000]
|
||||
#offset_y = [6, -24, 8, 6, 6, -6, -6]
|
||||
# E Un
|
||||
offset_x = [600, 600, 600, -6000, 600, -6000, 600]
|
||||
offset_y = [10, 10, -40, -40, 10, -40, 10]
|
||||
|
||||
for i in [0, 1, 2, 3, 4, 5, 6]:
|
||||
ax.annotate(speed_list[i], fontsize = 16, xy = (latency_fixed_list[i] + offset_x[i], energy_fixed_list[i] + offset_y[i]))
|
||||
#end_for
|
||||
|
||||
|
||||
for i in range(workload_count - 2, workload_count):
|
||||
|
||||
plt.plot(latency_list[delay][workload][i], energy_list[delay][workload][i], marker = marker_list[i], color= "black" , markersize = smallsize, label = marker_label_list[i])
|
||||
|
||||
#end_for
|
||||
|
||||
|
||||
|
||||
#plt.legend(numpoints=1)
|
||||
plt.legend(loc = "top left", numpoints = 1, handlelength = .8)
|
||||
|
||||
ax.set_title("Workload " + workload_list[workload] + " -- " + delay_list[delay] + " CPU",fontsize = 20, fontweight = "bold")
|
||||
#ax.set_title("Workload " + workload_list[workload] + " -- " + delay_list[delay] + " CPU",fontsize = 20, fontweight = "bold")
|
||||
ax.set_title("Workload " + workload_list[workload], fontsize = 20, fontweight = "bold")
|
||||
ax.set_xlabel("Workload Latency ($ms$)", fontsize = 20, fontweight = "bold")
|
||||
ax.set_ylabel("Net Energy Cost ($\mu Ah$)", fontsize = 20, fontweight = "bold")
|
||||
|
||||
|
|
Loading…
Reference in New Issue