From 0e467466b1171f162948e9aaa369c6117d915e05 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 9 Mar 2020 19:14:54 +0100 Subject: improve matplotlib code add new helper functions to get all y_values for a plot use seperate figures for each plot s/filepostfix/file_postfix/ to be consistent --- src/benchmarks/mysql.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/benchmarks/mysql.py') diff --git a/src/benchmarks/mysql.py b/src/benchmarks/mysql.py index 345a675..a5b215c 100644 --- a/src/benchmarks/mysql.py +++ b/src/benchmarks/mysql.py @@ -205,7 +205,7 @@ class BenchmarkMYSQL(Benchmark): xlabel='"threads"', ylabel='"transactions"', title='"sysbench oltp read only"', - filepostfix="l") + file_postfix="l") # normalized linear plot ref_alloc = list(allocators)[0] @@ -213,7 +213,7 @@ class BenchmarkMYSQL(Benchmark): xlabel='"threads"', ylabel='"transactions scaled at " + scale', title='"sysbench oltp read only"', - filepostfix="norm.l", + file_postfix="norm.l", scale=ref_alloc) # bar plot @@ -221,14 +221,14 @@ class BenchmarkMYSQL(Benchmark): xlabel='"threads"', ylabel='"transactions"', title='"sysbench oltp read only"', - filepostfix="b") + file_postfix="b") # normalized bar plot plt.barplot_single_arg(self, "{transactions}", xlabel='"threads"', ylabel='"transactions scaled at " + scale', title='"sysbench oltp read only"', - filepostfix="norm.b", + file_postfix="norm.b", scale=ref_alloc) # Memusage @@ -236,7 +236,7 @@ class BenchmarkMYSQL(Benchmark): xlabel='"threads"', ylabel='"VmHWM in kB"', title='"Memusage sysbench oltp read only"', - filepostfix="mem") + file_postfix="mem") plt.write_tex_table(self, [{ "label": "Transactions", @@ -247,7 +247,7 @@ class BenchmarkMYSQL(Benchmark): "expression": "{mysqld_vmhwm}", "sort": "<" }], - filepostfix="table") + file_postfix="table") # Colored latex table showing transactions count d = {allocator: {} for allocator in allocators} -- cgit v1.2.3