diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2016-05-11 22:03:53 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2016-05-11 22:03:53 -0400 |
| commit | 236b06a88f709ca6c70ce0c7adfb57f9f0b2a60d (patch) | |
| tree | 6be9561263946d30e0f402bae94786bc0a27393f /main.py | |
| parent | aa709603639d6a010ae20bc7fc2856c92693ecf6 (diff) | |
| download | pos-236b06a88f709ca6c70ce0c7adfb57f9f0b2a60d.tar.gz | |
Add final code used during experiments
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -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 |
