aboutsummaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..c37c288
--- /dev/null
+++ b/main.py
@@ -0,0 +1,36 @@
+import numpy as np
+import matplotlib.pyplot as plt
+import seaborn
+import matplotlib
+
+seaborn.set_style("white")
+
+matplotlib.rcParams.update({'xtick.labelsize': 12})
+matplotlib.rcParams.update({'ytick.labelsize': 12})
+matplotlib.rcParams.update({'legend.fontsize': 12})
+matplotlib.rcParams.update({'axes.titlesize': 12})
+matplotlib.rcParams.update({'axes.labelsize': 12})
+
+with open("time.txt") as fh:
+ values = [line.split() for line in fh]
+
+h, post, bfs = zip(*values)
+plt.plot(h, post, label="DF")
+plt.plot(h, bfs, label="BF")
+plt.legend()
+plt.xlabel("height")
+plt.ylabel("runtime (s)")
+plt.savefig("time.pdf", bbox_inches='tight')
+
+plt.clf()
+with open("misses.txt") as fh:
+ values = [line.split() for line in fh]
+h, bfs, post = zip(*values)
+plt.plot(h, post, label="DF")
+plt.plot(h, bfs, label="BF")
+plt.legend()
+plt.xlabel("height")
+plt.ylabel("cache-misses")
+plt.savefig("misses.pdf", bbox_inches='tight')
+
+print h, post, bfs