def plot_ipc(dict): # Query 1 title = 'Instruction Per Clock Cycle Query 1' ylabel = 'Instructions Per Clock Cycle' xlabel = 'Combined Selectivity' fig = init_fig(xlabel, ylabel, title) fname = 'combined_graph_q1_ipc.png' # Get the X-Points x = get_x_points() # Get the Y-Points y_land_q1 = get_ipc(dict['compiled_result_land_q1']) y_nb_q1 = get_ipc(dict['compiled_result_nb_q1']) y_pand_q1 = get_ipc(dict['compiled_result_pand_q1']) y_opt_q1 = get_ipc(dict['compiled_result_optimal_q1']) #Plot the Combined Results plot_combined_results(x, y_land_q1, y_nb_q1, y_pand_q1, y_opt_q1) fig.savefig(fname) # Query 2 title = 'Instructions Per Clock Cycle Query 2' fig = init_fig(xlabel, ylabel, title) fname = 'combined_graph_q2_ipc.png' # Get the Y-Points y_land_q2 = get_ipc(dict['compiled_result_land_q2']) y_nb_q2 = get_ipc(dict['compiled_result_nb_q2']) y_pand_q2 = get_ipc(dict['compiled_result_pand_q2']) y_opt_q2 = get_ipc(dict['compiled_result_optimal_q2']) #Plot the Combined Results plot_combined_results(x, y_land_q2, y_nb_q2, y_pand_q2, y_opt_q2) fig.savefig(fname) # Query 3 title = 'Instructions Per Clock Cycle Query 3' fig = init_fig(xlabel, ylabel, title) fname = 'combined_graph_q3_ipc.png' x = get_query3_x_points() # Get the Y-Points y_land_q3 = get_ipc(dict['compiled_result_land_q3']) y_nb_q3 = get_ipc(dict['compiled_result_nb_q3']) y_pand_q3 = get_ipc(dict['compiled_result_pand_q3']) y_opt_q3 = get_ipc(dict['compiled_result_optimal_q3']) #Plot the Combined Results plot_combined_results(x, y_land_q3, y_nb_q3, y_pand_q3, y_opt_q3) fig.savefig(fname)
def plot_elapsed_time(dict): # Query 1 title = 'Elapsed Time Query 1' ylabel = 'Elapsed Time (seconds)' xlabel = 'Combined Selectivity' fig = init_fig(xlabel, ylabel, title) fname = 'combined_graph_q1_elapsed_time.png' # Get the X-Points x = get_x_points() # Get the Y-Points y_land_q1 = get_elapsed_time(dict['compiled_result_land_q1']) y_nb_q1 = get_elapsed_time(dict['compiled_result_nb_q1']) y_pand_q1 = get_elapsed_time(dict['compiled_result_pand_q1']) y_opt_q1 = get_elapsed_time(dict['compiled_result_optimal_q1']) #Plot the Combined Results plot_combined_results(x, y_land_q1, y_nb_q1, y_pand_q1, y_opt_q1) fig.savefig(fname) # Query 2 title = 'Elapsed Time Query 2' fig = init_fig(xlabel, ylabel, title) fname = 'combined_graph_q2_elapsed_time.png' # Get the Y-Points y_land_q2 = get_elapsed_time(dict['compiled_result_land_q2']) y_nb_q2 = get_elapsed_time(dict['compiled_result_nb_q2']) y_pand_q2 = get_elapsed_time(dict['compiled_result_pand_q2']) y_opt_q2 = get_elapsed_time(dict['compiled_result_optimal_q2']) #Plot the Combined Results plot_combined_results(x, y_land_q2, y_nb_q2, y_pand_q2, y_opt_q2) fig.savefig(fname) # Query 3 title = 'Elapsed Time Query 3' fig = init_fig(xlabel, ylabel, title) fname = 'combined_graph_q3_elapsed_time.png' x = get_query3_x_points() # Get the Y-Points y_land_q3 = get_elapsed_time(dict['compiled_result_land_q3']) y_nb_q3 = get_elapsed_time(dict['compiled_result_nb_q3']) y_pand_q3 = get_elapsed_time(dict['compiled_result_pand_q3']) y_opt_q3 = get_elapsed_time(dict['compiled_result_optimal_q3']) #Plot the Combined Results plot_combined_results(x, y_land_q3, y_nb_q3, y_pand_q3, y_opt_q3) fig.savefig(fname)
def plot_mispredict_rate(dict): # Query 1 title = 'Branch MisPrediction Rate Query 1' ylabel = '% Branch Misprediction Rate' xlabel = 'Combined Selectivity' fig = init_fig(xlabel, ylabel, title) fname = 'combined_graph_q1_mispredict_rate.png' # Get the X-Points x = get_x_points() # Get the Y-Points y_land_q1 = get_mispredict_rate(dict['compiled_result_land_q1']) y_nb_q1 = get_mispredict_rate(dict['compiled_result_nb_q1']) y_pand_q1 = get_mispredict_rate(dict['compiled_result_pand_q1']) y_opt_q1 = get_mispredict_rate(dict['compiled_result_optimal_q1']) #Plot the Combined Results plot_combined_results(x, y_land_q1, y_nb_q1, y_pand_q1, y_opt_q1) fig.savefig(fname) # Query 2 title = 'Branch MisPrediction Rate Query 2' fig = init_fig(xlabel, ylabel, title) fname = 'combined_graph_q2_mispredict_rate.png' # Get the Y-Points y_land_q2 = get_mispredict_rate(dict['compiled_result_land_q2']) y_nb_q2 = get_mispredict_rate(dict['compiled_result_nb_q2']) y_pand_q2 = get_mispredict_rate(dict['compiled_result_pand_q2']) y_opt_q2 = get_mispredict_rate(dict['compiled_result_optimal_q2']) #Plot the Combined Results plot_combined_results(x, y_land_q2, y_nb_q2, y_pand_q2, y_opt_q2) fig.savefig(fname) # Query 3 title = 'Branch MisPrediction Rate Query 3' fig = init_fig(xlabel, ylabel, title) fname = 'combined_graph_q3_mispredict_rate.png' x = get_query3_x_points() # Get the Y-Points y_land_q3 = get_mispredict_rate(dict['compiled_result_land_q3']) y_nb_q3 = get_mispredict_rate(dict['compiled_result_nb_q3']) y_pand_q3 = get_mispredict_rate(dict['compiled_result_pand_q3']) y_opt_q3 = get_mispredict_rate(dict['compiled_result_optimal_q3']) #Plot the Combined Results plot_combined_results(x, y_land_q3, y_nb_q3, y_pand_q3, y_opt_q3) fig.savefig(fname)
def plot_predicted(result_dict, predicted_dict): # Query 1 title = 'Predicted and Actual Performance Query 1' ylabel = 'CPU Cycles per record' xlabel = 'Combined Selectivity' fig = init_fig(xlabel, ylabel, title) base_fname = 'predicted_perf_graph_q%d.png' fname = base_fname % 1 # Get the X-Points x = get_x_points() # Get the Y-Points y_land_q1 = get_cpu_cycles(result_dict['compiled_result_land_q1']) y_pand_q1 = get_cpu_cycles(result_dict['compiled_result_pand_q1']) y_opt_q1 = get_cpu_cycles(result_dict['compiled_result_optimal_q1']) y_pred_q1 = predicted_dict['predicted_runtime_cpu_cycles_q1'] #Plot the Combined Results plot_combined_predicted_results(x, y_land_q1, y_pred_q1, y_pand_q1, y_opt_q1) fig.savefig(fname) # Query 2 title = 'Predicted and Actual Performance Query 2' ylabel = 'CPU Cycles per record' xlabel = 'Combined Selectivity' fig = init_fig(xlabel, ylabel, title) base_fname = 'predicted_perf_graph_q%d.png' fname = base_fname % 2 # Get the X-Points x = get_x_points() # Get the Y-Points y_land_q2 = get_cpu_cycles(result_dict['compiled_result_land_q2']) y_pand_q2 = get_cpu_cycles(result_dict['compiled_result_pand_q2']) y_opt_q2 = get_cpu_cycles(result_dict['compiled_result_optimal_q2']) y_pred_q2 = predicted_dict['predicted_runtime_cpu_cycles_q2'] #Plot the Combined Results plot_combined_predicted_results(x, y_land_q2, y_pred_q2, y_pand_q2, y_opt_q2) fig.savefig(fname) # Query 3 title = 'Predicted and Actual Performance Query 3' ylabel = 'CPU Cycles per record' xlabel = 'Combined Selectivity' fig = init_fig(xlabel, ylabel, title) base_fname = 'predicted_perf_graph_q%d.png' fname = base_fname % 3 # Get the X-Points x = get_query3_x_points() # Get the Y-Points y_land_q3 = get_cpu_cycles(result_dict['compiled_result_land_q3']) y_pand_q3 = get_cpu_cycles(result_dict['compiled_result_pand_q3']) y_opt_q3 = get_cpu_cycles(result_dict['compiled_result_optimal_q3']) y_pred_q3 = predicted_dict['predicted_runtime_cpu_cycles_q3'] #Plot the Combined Results plot_combined_predicted_results(x, y_land_q3, y_pred_q3, y_pand_q3, y_opt_q3) fig.savefig(fname)