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/keydb.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'src/benchmarks/keydb.py') diff --git a/src/benchmarks/keydb.py b/src/benchmarks/keydb.py index 343d356..8502e21 100644 --- a/src/benchmarks/keydb.py +++ b/src/benchmarks/keydb.py @@ -110,14 +110,20 @@ class BenchmarkKeyDB(Benchmark): os.remove("dump.rdb") def summary(self): - plt.plot_fixed_arg(self, "{totals_ops}", - ylabel="'OPS/second'", - title="KeyDB Operations - {arg}: {arg_value}", - file_postfix="total_ops") - - plt.plot_fixed_arg(self, "{keydb_vmhwm}", - ylabel="'VmHWM [KB]'", - title="KeyDB Memusage - {arg}: {arg_value}", - file_postfix="vmhwm") + plt.plot(self, + "{totals_ops}", + fig_options={ + 'ylabel': "'OPS/second'", + 'title': "KeyDB Operations - {arg}: {arg_value}", + }, + file_postfix="total_ops") + + plt.plot(self, + "{keydb_vmhwm}", + fig_options={ + 'ylabel': "'VmHWM [KB]'", + 'title': "KeyDB Memusage - {arg}: {arg_value}", + }, + file_postfix="vmhwm") keydb = BenchmarkKeyDB() -- cgit v1.2.3