@@ -11,14 +11,16 @@ def plot_repeats_plot(outcomes, args):
1111
1212 # Drop precision column and sum up based on iteration
1313 rival = (outcomes .loc [(outcomes ['tool' ] == "rival" ) & (outcomes ['iter' ] > 0 )]).sort_values (by = ['iter' ])
14+ rival_no_repeats = (outcomes .loc [(outcomes ['tool' ] == "rival-no-repeats" ) & (outcomes ['iter' ] > 0 )]).sort_values (by = ['iter' ])
1415 baseline = (outcomes .loc [(outcomes ['tool' ] == "baseline" ) & (outcomes ['iter' ] > 0 )]).sort_values (by = ['iter' ])
1516
16- ax .bar (np .arange (len (baseline )) + 0.9 , baseline ['number_of_instr_executions' ], color = "green" , alpha = 1 , width = 0.4 , label = 'baseline' , hatch = '/' )
17- ax .bar (np .arange (len (rival )) + 1.1 , rival ['number_of_instr_executions' ], color = "red" , alpha = 0.7 , width = 0.4 , label = 'reval' )
17+ ax .bar (np .arange (len (baseline )) + 0.925 , 100 , color = "green" , alpha = 0.6 , width = 0.5 , label = 'baseline' , hatch = '/' )
18+ percentages = np .array (rival ['number_of_instr_executions' ]) / np .array (rival_no_repeats ['number_of_instr_executions' ]) * 100
19+ ax .bar (np .arange (len (rival )) + 1.075 , percentages , color = "red" , alpha = 1 , width = 0.5 , label = 'reval' )
1820
1921 ax .legend ()
2022 ax .set_xlabel ("Iteration" )
21- ax .set_ylabel ("Number of instruction executions " )
23+ ax .set_ylabel ("Percentage of instructions executed " )
2224 ax .yaxis .grid (True , linestyle = '-' , which = 'major' , color = 'grey' , alpha = 0.3 )
2325 plt .tight_layout ()
2426 plt .savefig (args .path + "/repeats_plot.png" , format = "png" )
0 commit comments