Loading Benchmark/gen_seq_docs.py→Benchmark/docs_seq_search.py +10 −3 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ refines = df["REFINES"].unique() # Get unique operations operations = df["OPERATION"].unique() # Remove refinement from operations operations = [ operation for operation in operations if operation != "refinement"] # Create docs for distribution in distributions: for refine in refines: Loading @@ -76,6 +80,9 @@ for distribution in distributions: if os.path.exists(result_dir): shutil.rmtree(result_dir) os.makedirs(result_dir) os.makedirs(result_dir + "/times") os.makedirs(result_dir + "/speedup") os.makedirs(result_dir + "/txt") for operation in operations: # Filter by distribution, refine, operation Loading @@ -99,7 +106,7 @@ for distribution in distributions: plt.ylabel("Time (s)") plt.title(title) plt.legend(["Linear", "Classic"]) plt.savefig(f"{result_dir}/{operation}_times.pdf") plt.savefig(f"{result_dir}/times/{operation}.pdf") plt.close() # Speedup, show 2 lines: speedup and 1 Loading @@ -115,9 +122,9 @@ for distribution in distributions: plt.ylabel("Speedup, times") plt.title(title) plt.legend(["Speedup, linear/classic"]) plt.savefig(f"{result_dir}/{operation}_speedup.pdf") plt.savefig(f"{result_dir}/speedup/{operation}.pdf") plt.close() # Save dataframe as table to file with open(f"{result_dir}/{operation}_times.txt", "w") as f: with open(f"{result_dir}/txt/{operation}.txt", "w") as f: f.write(all_df.to_string(index=False)) Loading
Benchmark/gen_seq_docs.py→Benchmark/docs_seq_search.py +10 −3 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ refines = df["REFINES"].unique() # Get unique operations operations = df["OPERATION"].unique() # Remove refinement from operations operations = [ operation for operation in operations if operation != "refinement"] # Create docs for distribution in distributions: for refine in refines: Loading @@ -76,6 +80,9 @@ for distribution in distributions: if os.path.exists(result_dir): shutil.rmtree(result_dir) os.makedirs(result_dir) os.makedirs(result_dir + "/times") os.makedirs(result_dir + "/speedup") os.makedirs(result_dir + "/txt") for operation in operations: # Filter by distribution, refine, operation Loading @@ -99,7 +106,7 @@ for distribution in distributions: plt.ylabel("Time (s)") plt.title(title) plt.legend(["Linear", "Classic"]) plt.savefig(f"{result_dir}/{operation}_times.pdf") plt.savefig(f"{result_dir}/times/{operation}.pdf") plt.close() # Speedup, show 2 lines: speedup and 1 Loading @@ -115,9 +122,9 @@ for distribution in distributions: plt.ylabel("Speedup, times") plt.title(title) plt.legend(["Speedup, linear/classic"]) plt.savefig(f"{result_dir}/{operation}_speedup.pdf") plt.savefig(f"{result_dir}/speedup/{operation}.pdf") plt.close() # Save dataframe as table to file with open(f"{result_dir}/{operation}_times.txt", "w") as f: with open(f"{result_dir}/txt/{operation}.txt", "w") as f: f.write(all_df.to_string(index=False))