From 60b860ce3619d5f165bf8eda6ad596d5d458d1e2 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 11 Feb 2020 13:23:55 +0100 Subject: move plotting code from src.benchmark to src.plots --- src/benchmarks/larson.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/benchmarks/larson.py') diff --git a/src/benchmarks/larson.py b/src/benchmarks/larson.py index 6e55fbe..8fce9ed 100644 --- a/src/benchmarks/larson.py +++ b/src/benchmarks/larson.py @@ -48,6 +48,7 @@ false sharing because it uses multiple threads, which pass memory around. import re from src.benchmark import Benchmark +import src.plots as plt THROUGHPUT_RE = re.compile( "^Throughput =\\s*(?P\\d+) operations per second.$") @@ -80,12 +81,14 @@ class BenchmarkLarson(Benchmark): def summary(self): # Plot threads->throughput and maxsize->throughput - self.plot_fixed_arg("{throughput}/1000000", - ylabel="'MOPS/s'", - title="'Larson: ' + arg + ' ' + str(arg_value)", - filepostfix="throughput") - - self.plot_fixed_arg( + plt.plot_fixed_arg(self, + "{throughput}/1000000", + ylabel="'MOPS/s'", + title="'Larson: ' + arg + ' ' + str(arg_value)", + filepostfix="throughput") + + plt.plot_fixed_arg( + self, "({L1-dcache-load-misses}/{L1-dcache-loads})*100", ylabel="'l1 cache misses in %'", title="'Larson cache misses: ' + arg + ' ' + str(arg_value)", -- cgit v1.2.3