From fe26e05dfba7b6c4a3e28b2be6dc369426277790 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 7 Apr 2020 15:54:25 +0200 Subject: unify plotting code Now there is only a single plot function which takes a plot type as well as some plot and figure options. --- src/benchmarks/larson.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/benchmarks/larson.py') diff --git a/src/benchmarks/larson.py b/src/benchmarks/larson.py index d2e9286..db38789 100644 --- a/src/benchmarks/larson.py +++ b/src/benchmarks/larson.py @@ -81,18 +81,21 @@ class BenchmarkLarson(Benchmark): def summary(self): # Plot threads->throughput and maxsize->throughput - plt.plot_fixed_arg(self, - "{throughput}/1000000", - ylabel="MOPS/s", - title="Larson: {arg} {arg_value}", - file_postfix="throughput") - - plt.plot_fixed_arg( - self, - "({L1-dcache-load-misses}/{L1-dcache-loads})*100", - ylabel="l1 cache misses in %", - title="Larson cache misses: {arg} {arg_value}", - file_postfix="cachemisses") + plt.plot(self, + "{throughput}/1000000", + fig_options={ + 'ylabel': "MOPS/s", + 'title': "Larson: {arg} {arg_value}", + }, + file_postfix="throughput") + + plt.plot(self, + "({L1-dcache-load-misses}/{L1-dcache-loads})*100", + fig_options={ + 'ylabel': "l1 cache misses in %", + 'title': "Larson cache misses: {arg} {arg_value}", + }, + file_postfix="cachemisses") larson = BenchmarkLarson() -- cgit v1.2.3