From 70d464b53602d4b4f22e7256aba0bc12d7addd8f Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 23 Jan 2020 18:14:11 +0100 Subject: generate an example pgfplot for the loop benchmark --- src/benchmarks/loop.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/benchmarks') diff --git a/src/benchmarks/loop.py b/src/benchmarks/loop.py index 4ab7d46..b0c3929 100644 --- a/src/benchmarks/loop.py +++ b/src/benchmarks/loop.py @@ -85,5 +85,13 @@ class BenchmarkLoop(Benchmark): self.export_stats_to_csv("task-clock") self.export_stats_to_dataref("task-clock") + # pgfplot test + self.pgfplot_linear(self.iterate_args_fixed({"maxsize": 1024}, args=self.results["args"]), + "int(perm.nthreads)", + "perm.nthreads / ({task-clock}/1000)", + xlabel='"Threads"', + ylabel='"MOPS/cpu-second"', + title='"Loop: 1024B"', + postfix='mops_1024B') loop = BenchmarkLoop() -- cgit v1.2.3 From 9e2d7eb1cb952b398bd7363ab95ea9f1d4598ab1 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 11 Feb 2020 12:38:00 +0100 Subject: implement standalone pgfplot legend creation --- src/benchmarks/loop.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/benchmarks') diff --git a/src/benchmarks/loop.py b/src/benchmarks/loop.py index b0c3929..a969f4a 100644 --- a/src/benchmarks/loop.py +++ b/src/benchmarks/loop.py @@ -94,4 +94,7 @@ class BenchmarkLoop(Benchmark): title='"Loop: 1024B"', postfix='mops_1024B') + # create pgfplot legend + self.pgfplot_legend() + loop = BenchmarkLoop() -- cgit v1.2.3 From 60b860ce3619d5f165bf8eda6ad596d5d458d1e2 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 11 Feb 2020 13:23:55 +0100 Subject: move plotting code from src.benchmark to src.plots --- src/benchmarks/blowup.py | 12 ++++++----- src/benchmarks/cfrac.py | 26 +++++++++++++---------- src/benchmarks/espresso.py | 30 ++++++++++++++------------ src/benchmarks/falsesharing.py | 39 ++++++++++++++++++---------------- src/benchmarks/fd.py | 23 +++++++++++--------- src/benchmarks/httpd.py | 46 +++++++++++++++++++++------------------- src/benchmarks/larson.py | 15 +++++++------ src/benchmarks/lld.py | 9 ++++---- src/benchmarks/loop.py | 48 ++++++++++++++++++++++++------------------ src/benchmarks/raxmlng.py | 29 +++++++++++++------------ 10 files changed, 154 insertions(+), 123 deletions(-) (limited to 'src/benchmarks') diff --git a/src/benchmarks/blowup.py b/src/benchmarks/blowup.py index aca9293..8f8e550 100644 --- a/src/benchmarks/blowup.py +++ b/src/benchmarks/blowup.py @@ -17,6 +17,7 @@ """Definition of the blowup micro benchmark""" from src.benchmark import Benchmark +import src.plots as plt class BenchmarkBlowup(Benchmark): @@ -53,15 +54,16 @@ class BenchmarkBlowup(Benchmark): } } - self.barplot_single_arg("{VmHWM}/1000", - ylabel='"VmHWM in MB"', - title='"blowup test"', - filepostfix="vmhwm") + plt.barplot_single_arg(self, + "{VmHWM}/1000", + ylabel='"VmHWM in MB"', + title='"blowup test"', + filepostfix="vmhwm") del allocators["Ideal-RSS"] del self.results["stats"]["Ideal-RSS"] - self.export_stats_to_dataref("VmHWM") + plt.export_stats_to_dataref(self, "VmHWM") blowup = BenchmarkBlowup() diff --git a/src/benchmarks/cfrac.py b/src/benchmarks/cfrac.py index dfd87d6..34c0894 100644 --- a/src/benchmarks/cfrac.py +++ b/src/benchmarks/cfrac.py @@ -59,6 +59,7 @@ API function as well as memory placement strategies with good data locality. """ from src.benchmark import Benchmark +import src.plots as plt class BenchmarkCfrac(Benchmark): @@ -75,13 +76,15 @@ class BenchmarkCfrac(Benchmark): def summary(self): # Speed - self.barplot_single_arg("{task-clock}/1000", - ylabel='"cpu-second"', - title='"Cfrac: runtime"', - filepostfix="time") + plt.barplot_single_arg(self, + "{task-clock}/1000", + ylabel='"cpu-second"', + title='"Cfrac: runtime"', + filepostfix="time") # L1 cache misses - self.barplot_single_arg( + plt.barplot_single_arg( + self, "({L1-dcache-load-misses}/{L1-dcache-loads})*100", ylabel='"L1 misses in %"', title='"Cfrac l1 cache misses"', @@ -89,10 +92,11 @@ class BenchmarkCfrac(Benchmark): yerr=False) # Memusage - self.barplot_single_arg("{VmHWM}", - ylabel='"VmHWM in KB"', - title='"Cfrac VmHWM"', - filepostfix="vmhwm") + plt.barplot_single_arg(self, + "{VmHWM}", + ylabel='"VmHWM in KB"', + title='"Cfrac VmHWM"', + filepostfix="vmhwm") self.write_tex_table([{ "label": "Runtime [ms]", @@ -105,9 +109,9 @@ class BenchmarkCfrac(Benchmark): }], filepostfix="table") - self.export_stats_to_dataref("task-clock") + plt.export_stats_to_dataref(self, "task-clock") - self.export_stats_to_dataref("VmHWM") + plt.export_stats_to_dataref(self, "VmHWM") cfrac = BenchmarkCfrac() diff --git a/src/benchmarks/espresso.py b/src/benchmarks/espresso.py index 2f8b8bf..1c9d4d2 100644 --- a/src/benchmarks/espresso.py +++ b/src/benchmarks/espresso.py @@ -59,6 +59,7 @@ import os from src.benchmark import Benchmark import src.globalvars +import src.plots as plt class BenchmarkEspresso(Benchmark): @@ -79,13 +80,15 @@ class BenchmarkEspresso(Benchmark): def summary(self): # Speed - self.barplot_single_arg("{task-clock}/1000", - ylabel='"cpu-second"', - title='"Espresso: runtime"', - filepostfix="time") + plt.barplot_single_arg(self, + "{task-clock}/1000", + ylabel='"cpu-second"', + title='"Espresso: runtime"', + filepostfix="time") # L1 cache misses - self.barplot_single_arg( + plt.barplot_single_arg( + self, "({L1-dcache-load-misses}/{L1-dcache-loads})*100", ylabel='"L1 misses in %"', title='"Espresso l1 cache misses"', @@ -93,12 +96,13 @@ class BenchmarkEspresso(Benchmark): yerr=False) # Memusage - self.barplot_single_arg("{VmHWM}", - ylabel='"VmHWM in KB"', - title='"Espresso VmHWM"', - filepostfix="vmhwm") + plt.barplot_single_arg(self, + "{VmHWM}", + ylabel='"VmHWM in KB"', + title='"Espresso VmHWM"', + filepostfix="vmhwm") - self.write_tex_table([{ + plt.write_tex_table(self, [{ "label": "Runtime [ms]", "expression": "{task-clock}", "sort": "<" @@ -107,11 +111,11 @@ class BenchmarkEspresso(Benchmark): "expression": "{VmHWM}", "sort": "<" }], - filepostfix="table") + filepostfix="table") - self.export_stats_to_dataref("task-clock") + plt.export_stats_to_dataref(self, "task-clock") - self.export_stats_to_dataref("VmHWM") + plt.export_stats_to_dataref(self, "VmHWM") espresso = BenchmarkEspresso() diff --git a/src/benchmarks/falsesharing.py b/src/benchmarks/falsesharing.py index 530ca99..626104a 100644 --- a/src/benchmarks/falsesharing.py +++ b/src/benchmarks/falsesharing.py @@ -23,6 +23,7 @@ import numpy as np from src.benchmark import Benchmark from src.globalvars import summary_file_ext +import src.plots as plt TIME_RE = re.compile("^Time elapsed = (?P