aboutsummaryrefslogtreecommitdiff
path: root/src/benchmarks/loop.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks/loop.py')
-rw-r--r--src/benchmarks/loop.py48
1 files changed, 28 insertions, 20 deletions
diff --git a/src/benchmarks/loop.py b/src/benchmarks/loop.py
index a969f4a..75c56ee 100644
--- a/src/benchmarks/loop.py
+++ b/src/benchmarks/loop.py
@@ -35,6 +35,7 @@ Interpretation:
"""
from src.benchmark import Benchmark
+import src.plots as plt
class BenchmarkLoop(Benchmark):
@@ -57,14 +58,16 @@ class BenchmarkLoop(Benchmark):
def summary(self):
# Speed
- self.plot_fixed_arg("perm.nthreads / ({task-clock}/1000)",
- ylabel='"MOPS/cpu-second"',
- title='"Loop: " + arg + " " + str(arg_value)',
- filepostfix="time",
- autoticks=False)
+ plt.plot_fixed_arg(self,
+ "perm.nthreads / ({task-clock}/1000)",
+ ylabel='"MOPS/cpu-second"',
+ title='"Loop: " + arg + " " + str(arg_value)',
+ filepostfix="time",
+ autoticks=False)
# L1 cache misses
- self.plot_fixed_arg(
+ plt.plot_fixed_arg(
+ self,
"({L1-dcache-load-misses}/{L1-dcache-loads})*100",
ylabel='"L1 misses in %"',
title='"Loop l1 cache misses: " + arg + " " + str(arg_value)',
@@ -72,29 +75,34 @@ class BenchmarkLoop(Benchmark):
autoticks=False)
# Speed Matrix
- self.write_best_doublearg_tex_table(
- "perm.nthreads / ({task-clock}/1000)", filepostfix="time.matrix")
+ plt.write_best_doublearg_tex_table(
+ self,
+ "perm.nthreads / ({task-clock}/1000)",
+ filepostfix="time.matrix")
- self.write_tex_table([{
+ plt.write_tex_table(self, [{
"label": "MOPS/s",
"expression": "perm.nthreads / ({task-clock}/1000)",
"sort": ">"
}],
- filepostfix="mops.table")
+ filepostfix="mops.table")
- self.export_stats_to_csv("task-clock")
- self.export_stats_to_dataref("task-clock")
+ plt.export_stats_to_csv(self, "task-clock")
+ plt.export_stats_to_dataref(self, "task-clock")
# pgfplot test
- self.pgfplot_linear(self.iterate_args_fixed({"maxsize": 1024}, args=self.results["args"]),
- "int(perm.nthreads)",
- "perm.nthreads / ({task-clock}/1000)",
- xlabel='"Threads"',
- ylabel='"MOPS/cpu-second"',
- title='"Loop: 1024B"',
- postfix='mops_1024B')
+ plt.pgfplot_linear(self,
+ self.iterate_args_fixed({"maxsize": 1024},
+ args=self.results["args"]),
+ "int(perm.nthreads)",
+ "perm.nthreads / ({task-clock}/1000)",
+ xlabel='"Threads"',
+ ylabel='"MOPS/cpu-second"',
+ title='"Loop: 1024B"',
+ postfix='mops_1024B')
# create pgfplot legend
- self.pgfplot_legend()
+ plt.pgfplot_legend(self)
+
loop = BenchmarkLoop()