Commit fd781503 authored by Illia Kolesnik's avatar Illia Kolesnik
Browse files

Changes to doc generation

parent 320aedeb
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -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:
@@ -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
@@ -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
@@ -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))