46 lines
No EOL
1.9 KiB
Python
46 lines
No EOL
1.9 KiB
Python
import pandas as pd
|
|
from constants import *
|
|
from utils import *
|
|
|
|
throt_data = pd.DataFrame(columns=["model","noc architecture","throttled percentage"])
|
|
sim_time_data = pd.DataFrame(columns=["model","noc architecture","execution time"])
|
|
el_tim_data = pd.DataFrame(columns=["model","noc architecture","elapsed time"])
|
|
conf_time_data = pd.DataFrame(columns=["model","noc architecture","configuration time"])
|
|
|
|
# process data
|
|
count = 0
|
|
for net, models in net_models.items():
|
|
for model in models:
|
|
conf_folder = result_folder + model
|
|
|
|
el_tim_data.loc[count] = [model, net, get_elapsed_time(conf_folder)]
|
|
throt_data.loc[count] = [model, net, get_throt_perc(conf_folder)]
|
|
sim_time_data.loc[count] = [model, net, get_sim_time(conf_folder)]
|
|
conf_time = 0 if net not in final_conf_tasks \
|
|
else get_conf_time(conf_folder, final_conf_tasks[net][model])
|
|
conf_time_data.loc[count] = [model, net, conf_time]
|
|
|
|
count += 1
|
|
|
|
# print graphs
|
|
plt.clf()
|
|
with open('results.txt', 'w') as f:
|
|
print("", file=f)
|
|
for i in range(len(list(net_models.values())[0])):
|
|
models = [model[i] for model in list(net_models.values())]
|
|
conf_models = [model[i] for model in list(net_models.values())
|
|
if "conf" in model[i]]
|
|
|
|
throt_table = throt_data[throt_data["model"].isin(models)]
|
|
generate_throttle_graph(throt_table, models[0])
|
|
|
|
sim_time_table = sim_time_data[sim_time_data["model"].isin(models)]
|
|
norm_sim_time_table = normalize_sim_time(sim_time_table)
|
|
generate_sim_time_graph(norm_sim_time_table, models[0])
|
|
|
|
el_tim_table = el_tim_data[el_tim_data["model"].isin(models)]
|
|
generate_el_time_graph(el_tim_table, models[0])
|
|
|
|
conf_table = conf_time_data[conf_time_data["model"].isin(conf_models)]
|
|
norm_conf_table = normalize_conf_time(conf_table)
|
|
generate_conf_time_graph(conf_table, models[0]) |