diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-04-07 15:54:25 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-04-07 15:54:25 +0200 |
| commit | fe26e05dfba7b6c4a3e28b2be6dc369426277790 (patch) | |
| tree | e724a1264ea3e1f07f327d6d27e0c5afafa09d23 /src/benchmarks/mysql.py | |
| parent | 57d94cd47a4a5c187aed2245b0f213ba520f2405 (diff) | |
| download | allocbench-fe26e05dfba7b6c4a3e28b2be6dc369426277790.tar.gz allocbench-fe26e05dfba7b6c4a3e28b2be6dc369426277790.zip | |
unify plotting code
Now there is only a single plot function which takes a plot type as
well as some plot and figure options.
Diffstat (limited to 'src/benchmarks/mysql.py')
| -rw-r--r-- | src/benchmarks/mysql.py | 72 |
1 files changed, 45 insertions, 27 deletions
diff --git a/src/benchmarks/mysql.py b/src/benchmarks/mysql.py index a5b215c..0df85d2 100644 --- a/src/benchmarks/mysql.py +++ b/src/benchmarks/mysql.py @@ -201,42 +201,60 @@ class BenchmarkMYSQL(Benchmark): args = self.results["args"] # linear plot - plt.plot_single_arg(self, "{transactions}", - xlabel='"threads"', - ylabel='"transactions"', - title='"sysbench oltp read only"', - file_postfix="l") + plt.plot(self, + "{transactions}", + fig_options={ + 'xlabel': 'threads', + 'ylabel': 'transactions', + 'title': 'sysbench oltp read only', + }, + file_postfix="l") # normalized linear plot ref_alloc = list(allocators)[0] - plt.plot_single_arg(self, "{transactions}", - xlabel='"threads"', - ylabel='"transactions scaled at " + scale', - title='"sysbench oltp read only"', - file_postfix="norm.l", - scale=ref_alloc) + plt.plot(self, + "{transactions}", + fig_options={ + 'xlabel': 'threads', + 'ylabel': 'transactions scaled at {scale}', + 'title': 'sysbench oltp read only', + }, + file_postfix="norm.l", + scale=ref_alloc) # bar plot - plt.barplot_single_arg(self, "{transactions}", - xlabel='"threads"', - ylabel='"transactions"', - title='"sysbench oltp read only"', - file_postfix="b") + plt.plot(self, + "{transactions}", + plot_type='bar', + fig_options={ + 'xlabel': 'threads', + 'ylabel': 'transactions', + 'title': 'sysbench oltp read only', + }, + file_postfix="b") # normalized bar plot - plt.barplot_single_arg(self, "{transactions}", - xlabel='"threads"', - ylabel='"transactions scaled at " + scale', - title='"sysbench oltp read only"', - file_postfix="norm.b", - scale=ref_alloc) + plt.plot(self, + "{transactions}", + plot_type='bar', + fig_options={ + 'xlabel': 'threads', + 'ylabel': 'transactions scaled at {scale}', + 'title': 'sysbench oltp read only', + }, + file_postfix="norm.b", + scale=ref_alloc) # Memusage - plt.barplot_single_arg(self, "{mysqld_vmhwm}", - xlabel='"threads"', - ylabel='"VmHWM in kB"', - title='"Memusage sysbench oltp read only"', - file_postfix="mem") + plt.plot(self, + "{mysqld_vmhwm}", + plot_type='bar', + fig_options={ + 'xlabel': 'threads', + 'ylabel': 'VmHWM in kB', + 'title': 'Memusage sysbench oltp read only', + }, + file_postfix="mem") plt.write_tex_table(self, [{ "label": "Transactions", |
