From 01cdcd79da31f8f390e29eabd062bcbf57ff838d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 20 Aug 2018 00:00:24 +0200 Subject: add summary directory option --- mysql.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mysql.py') diff --git a/mysql.py b/mysql.py index 45ba6b6..6818170 100644 --- a/mysql.py +++ b/mysql.py @@ -198,12 +198,14 @@ class Benchmark_MYSQL( Benchmark ): return True - def summary(self): + def summary(self, sd=None): # linear plot nthreads = self.results["args"]["nthreads"] targets = self.results["targets"] y_mapping = {v: i for i, v in enumerate(nthreads)} + sd = sd or "" + for target in targets: if target == "chattymalloc": continue @@ -220,7 +222,7 @@ class Benchmark_MYSQL( Benchmark ): plt.xlabel("threads") plt.ylabel("transactions") plt.title("sysbench oltp read only") - plt.savefig(self.name + ".l.ro.png") + plt.savefig(os.path.join(sd,self.name + ".l.ro.png")) plt.clf() # bar plot @@ -246,7 +248,7 @@ class Benchmark_MYSQL( Benchmark ): plt.xticks(range(1, len(nthreads) + 1), nthreads) plt.ylabel("transactions") plt.title("sysbench oltp read only") - plt.savefig(self.name + ".b.ro.png") + plt.savefig(os.path.join(sd, self.name + ".b.ro.png")) plt.clf() for mid, measures in self.results.items(): -- cgit v1.2.3