aboutsummaryrefslogtreecommitdiff
path: root/falsesharing.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2018-08-20 00:00:24 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2018-08-20 00:00:24 +0200
commit01cdcd79da31f8f390e29eabd062bcbf57ff838d (patch)
treed0f5545925598881190a6476b6ff6614a8abf397 /falsesharing.py
parentbbaf5dab2bbc060332d18c663e1c404d1d0e0e2e (diff)
downloadallocbench-01cdcd79da31f8f390e29eabd062bcbf57ff838d.tar.gz
allocbench-01cdcd79da31f8f390e29eabd062bcbf57ff838d.zip
add summary directory option
Diffstat (limited to 'falsesharing.py')
-rw-r--r--falsesharing.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/falsesharing.py b/falsesharing.py
index b5d7a9f..f42a849 100644
--- a/falsesharing.py
+++ b/falsesharing.py
@@ -102,11 +102,13 @@ class Benchmark_Falsesharing( Benchmark ):
print()
return True
- def summary(self):
+ def summary(self, sd=None):
# Speedup thrash
nthreads = self.results["args"]["nthreads"]
targets = self.results["targets"]
+ sd = sd or ""
+
y_mapping = {v : i for i, v in enumerate(nthreads)}
for bench in ["thrash", "scratch"]:
for target in targets:
@@ -135,7 +137,7 @@ class Benchmark_Falsesharing( Benchmark ):
plt.xlabel("threads")
plt.ylabel("speedup")
plt.title(bench)
- plt.savefig(self.name + "." + bench + ".png")
+ plt.savefig(os.path.join(sd, self.name + "." + bench + ".png"))
plt.clf()
falsesharing= Benchmark_Falsesharing()