aboutsummaryrefslogtreecommitdiff
path: root/src/benchmarks/falsesharing.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks/falsesharing.py')
-rw-r--r--src/benchmarks/falsesharing.py39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/benchmarks/falsesharing.py b/src/benchmarks/falsesharing.py
index 530ca99..626104a 100644
--- a/src/benchmarks/falsesharing.py
+++ b/src/benchmarks/falsesharing.py
@@ -23,6 +23,7 @@ import numpy as np
from src.benchmark import Benchmark
from src.globalvars import summary_file_ext
+import src.plots as plt
TIME_RE = re.compile("^Time elapsed = (?P<time>\\d*\\.\\d*) seconds.$")
@@ -78,14 +79,16 @@ class BenchmarkFalsesharing(Benchmark):
del self.results["stats"]
self.calc_desc_statistics()
- self.plot_fixed_arg("{speedup}",
- ylabel="'Speedup'",
- title="'Speedup: ' + arg + ' ' + str(arg_value)",
- filepostfix="speedup",
- autoticks=False,
- fixed=["bench"])
+ plt.plot_fixed_arg(self,
+ "{speedup}",
+ ylabel="'Speedup'",
+ title="'Speedup: ' + arg + ' ' + str(arg_value)",
+ filepostfix="speedup",
+ autoticks=False,
+ fixed=["bench"])
- self.plot_fixed_arg(
+ plt.plot_fixed_arg(
+ self,
"{l1chache_misses}",
ylabel="'l1 cache misses in %'",
title="'cache misses: ' + arg + ' ' + str(arg_value)",
@@ -93,23 +96,23 @@ class BenchmarkFalsesharing(Benchmark):
autoticks=False,
fixed=["bench"])
- self.plot_fixed_arg(
- "({LLC-load-misses}/{LLC-loads})*100",
- ylabel="'llc cache misses in %'",
- title="'LLC misses: ' + arg + ' ' + str(arg_value)",
- filepostfix="llc-misses",
- autoticks=False,
- fixed=["bench"])
+ plt.plot_fixed_arg(self,
+ "({LLC-load-misses}/{LLC-loads})*100",
+ ylabel="'llc cache misses in %'",
+ title="'LLC misses: ' + arg + ' ' + str(arg_value)",
+ filepostfix="llc-misses",
+ autoticks=False,
+ fixed=["bench"])
- self.write_tex_table([{
+ plt.write_tex_table(self, [{
"label": "Speedup",
"expression": "{speedup}",
"sort": ">"
}],
- filepostfix="speedup.table")
+ filepostfix="speedup.table")
- self.export_stats_to_csv("speedup", "time")
- self.export_stats_to_csv("l1chache_misses", "l1-misses")
+ plt.export_stats_to_csv(self, "speedup", "time")
+ plt.export_stats_to_csv(self, "l1chache_misses", "l1-misses")
falsesharing = BenchmarkFalsesharing()