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/espresso.py | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'src/benchmarks/espresso.py') diff --git a/src/benchmarks/espresso.py b/src/benchmarks/espresso.py index 6012d02..b0b9c09 100644 --- a/src/benchmarks/espresso.py +++ b/src/benchmarks/espresso.py @@ -80,27 +80,33 @@ class BenchmarkEspresso(Benchmark): def summary(self): # Speed - plt.barplot_single_arg(self, - "{task-clock}/1000", - ylabel="cpu-second", - title="Espresso: runtime", - file_postfix="time") + plt.plot(self, + "{task-clock}/1000", + plot_type='bar', + fig_options={ + 'ylabel': "cpu-second", + 'title': "Espresso: runtime", + }, + file_postfix="time") # L1 cache misses - plt.barplot_single_arg( - self, - "({L1-dcache-load-misses}/{L1-dcache-loads})*100", - ylabel="L1 misses in %", - title="Espresso l1 cache misses", - file_postfix="l1misses", - yerr=False) + plt.plot(self, + "({L1-dcache-load-misses}/{L1-dcache-loads})*100", + fig_options={ + 'ylabel': "L1 misses in %", + 'title': "Espresso l1 cache misses", + 'yerr': False + }, + file_postfix="l1misses") # Memusage - plt.barplot_single_arg(self, - "{VmHWM}", - ylabel="VmHWM in KB", - title="Espresso VmHWM", - file_postfix="vmhwm") + plt.plot(self, + "{VmHWM}", + fig_options={ + 'ylabel': "VmHWM in KB", + 'title': "Espresso VmHWM", + } + file_postfix="vmhwm") plt.write_tex_table(self, [{ "label": "Runtime [ms]", -- cgit v1.2.3