aboutsummaryrefslogtreecommitdiff
path: root/src/benchmarks/falsesharing.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-04-07 15:54:25 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-04-07 15:54:25 +0200
commitfe26e05dfba7b6c4a3e28b2be6dc369426277790 (patch)
treee724a1264ea3e1f07f327d6d27e0c5afafa09d23 /src/benchmarks/falsesharing.py
parent57d94cd47a4a5c187aed2245b0f213ba520f2405 (diff)
downloadallocbench-fe26e05dfba7b6c4a3e28b2be6dc369426277790.tar.gz
allocbench-fe26e05dfba7b6c4a3e28b2be6dc369426277790.zip
unify plotting code
Now there is only a single plot function which takes a plot type as well as some plot and figure options.
Diffstat (limited to 'src/benchmarks/falsesharing.py')
-rw-r--r--src/benchmarks/falsesharing.py48
1 files changed, 21 insertions, 27 deletions
diff --git a/src/benchmarks/falsesharing.py b/src/benchmarks/falsesharing.py
index 5c18367..6735aa4 100644
--- a/src/benchmarks/falsesharing.py
+++ b/src/benchmarks/falsesharing.py
@@ -62,8 +62,7 @@ class BenchmarkFalsesharing(Benchmark):
for allocator in allocators:
sequential_perm = self.Perm(bench=bench, threads=1)
- for perm in self.iterate_args_fixed({"bench": bench},
- args=args):
+ for perm in self.iterate_args({"bench": bench}, args=args):
speedup = []
l1chache_misses = []
for i, measure in enumerate(self.results[allocator][perm]):
@@ -79,30 +78,25 @@ class BenchmarkFalsesharing(Benchmark):
del self.results["stats"]
self.calc_desc_statistics()
- plt.plot_fixed_arg(self,
- "{speedup}",
- ylabel="Speedup",
- title="Speedup: {arg} {arg_value}",
- file_postfix="speedup",
- autoticks=False,
- fixed=["bench"])
-
- plt.plot_fixed_arg(
- self,
- "{l1chache_misses}",
- ylabel="l1 cache misses in %",
- title="cache misses: {arg} {arg_value}",
- file_postfix="l1-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} {arg_value}",
- # file_postfix="llc-misses",
- # autoticks=False,
- # fixed=["bench"])
+ plt.plot(self,
+ "{speedup}",
+ x_args=["bench"],
+ fig_options={
+ 'ylabel': "Speedup",
+ 'title': "Speedup: {arg} {arg_value}",
+ 'autoticks': False,
+ },
+ file_postfix="speedup")
+
+ plt.plot(self,
+ "{l1chache_misses}",
+ x_args=["bench"]
+ fig_options={
+ 'ylabel': "l1 cache misses in %",
+ 'title': "cache misses: {arg} {arg_value}",
+ 'autoticks': False,
+ },
+ file_postfix="l1-misses")
plt.write_tex_table(self, [{
"label": "Speedup",
@@ -117,7 +111,7 @@ class BenchmarkFalsesharing(Benchmark):
# pgfplots
for bench in args["bench"]:
plt.pgfplot(self,
- self.iterate_args_fixed({"bench": bench}, args=args),
+ self.iterate_args({"bench": bench}, args=args),
"int(perm.threads)",
"{speedup}",
xlabel="Threads",