diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-02-11 14:22:07 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-02-11 14:25:55 +0100 |
| commit | 5d6a470ce0c7d334205293de9b596a5ea4eb2e8c (patch) | |
| tree | faaff064ca49524167e2f1933a055ee816280946 /src/benchmarks | |
| parent | 60b860ce3619d5f165bf8eda6ad596d5d458d1e2 (diff) | |
| download | allocbench-5d6a470ce0c7d334205293de9b596a5ea4eb2e8c.tar.gz allocbench-5d6a470ce0c7d334205293de9b596a5ea4eb2e8c.zip | |
cleanup plot code
* use str.format instead of eval for plot labels
* use meaningful variable names
* add license header
* add some doc strings
Diffstat (limited to 'src/benchmarks')
| -rw-r--r-- | src/benchmarks/blowup.py | 4 | ||||
| -rw-r--r-- | src/benchmarks/cfrac.py | 8 | ||||
| -rw-r--r-- | src/benchmarks/espresso.py | 12 | ||||
| -rw-r--r-- | src/benchmarks/falsesharing.py | 12 | ||||
| -rw-r--r-- | src/benchmarks/fd.py | 8 | ||||
| -rw-r--r-- | src/benchmarks/httpd.py | 18 | ||||
| -rw-r--r-- | src/benchmarks/larson.py | 8 |
7 files changed, 35 insertions, 35 deletions
diff --git a/src/benchmarks/blowup.py b/src/benchmarks/blowup.py index 8f8e550..d3700e3 100644 --- a/src/benchmarks/blowup.py +++ b/src/benchmarks/blowup.py @@ -56,8 +56,8 @@ class BenchmarkBlowup(Benchmark): plt.barplot_single_arg(self, "{VmHWM}/1000", - ylabel='"VmHWM in MB"', - title='"blowup test"', + ylabel="VmHWM in MB", + title="blowup test", filepostfix="vmhwm") del allocators["Ideal-RSS"] diff --git a/src/benchmarks/cfrac.py b/src/benchmarks/cfrac.py index 34c0894..59c8858 100644 --- a/src/benchmarks/cfrac.py +++ b/src/benchmarks/cfrac.py @@ -86,16 +86,16 @@ class BenchmarkCfrac(Benchmark): plt.barplot_single_arg( self, "({L1-dcache-load-misses}/{L1-dcache-loads})*100", - ylabel='"L1 misses in %"', - title='"Cfrac l1 cache misses"', + ylabel="L1 misses in %", + title="Cfrac l1 cache misses", filepostfix="l1misses", yerr=False) # Memusage plt.barplot_single_arg(self, "{VmHWM}", - ylabel='"VmHWM in KB"', - title='"Cfrac VmHWM"', + ylabel="VmHWM in KB", + title="Cfrac VmHWM", filepostfix="vmhwm") self.write_tex_table([{ diff --git a/src/benchmarks/espresso.py b/src/benchmarks/espresso.py index 1c9d4d2..5149dcb 100644 --- a/src/benchmarks/espresso.py +++ b/src/benchmarks/espresso.py @@ -82,24 +82,24 @@ class BenchmarkEspresso(Benchmark): # Speed plt.barplot_single_arg(self, "{task-clock}/1000", - ylabel='"cpu-second"', - title='"Espresso: runtime"', + ylabel="cpu-second", + title="Espresso: runtime", filepostfix="time") # L1 cache misses plt.barplot_single_arg( self, "({L1-dcache-load-misses}/{L1-dcache-loads})*100", - ylabel='"L1 misses in %"', - title='"Espresso l1 cache misses"', + ylabel="L1 misses in %", + title="Espresso l1 cache misses", filepostfix="l1misses", yerr=False) # Memusage plt.barplot_single_arg(self, "{VmHWM}", - ylabel='"VmHWM in KB"', - title='"Espresso VmHWM"', + ylabel="VmHWM in KB", + title="Espresso VmHWM", filepostfix="vmhwm") plt.write_tex_table(self, [{ diff --git a/src/benchmarks/falsesharing.py b/src/benchmarks/falsesharing.py index 626104a..fb4627d 100644 --- a/src/benchmarks/falsesharing.py +++ b/src/benchmarks/falsesharing.py @@ -81,8 +81,8 @@ class BenchmarkFalsesharing(Benchmark): plt.plot_fixed_arg(self, "{speedup}", - ylabel="'Speedup'", - title="'Speedup: ' + arg + ' ' + str(arg_value)", + ylabel="Speedup", + title="Speedup: {arg} {arg_value}", filepostfix="speedup", autoticks=False, fixed=["bench"]) @@ -90,16 +90,16 @@ class BenchmarkFalsesharing(Benchmark): plt.plot_fixed_arg( self, "{l1chache_misses}", - ylabel="'l1 cache misses in %'", - title="'cache misses: ' + arg + ' ' + str(arg_value)", + ylabel="l1 cache misses in %", + title="cache misses: {arg} {arg_value}", filepostfix="l1-misses", autoticks=False, fixed=["bench"]) plt.plot_fixed_arg(self, "({LLC-load-misses}/{LLC-loads})*100", - ylabel="'llc cache misses in %'", - title="'LLC misses: ' + arg + ' ' + str(arg_value)", + ylabel="llc cache misses in %", + title="LLC misses: {arg} {arg_value}", filepostfix="llc-misses", autoticks=False, fixed=["bench"]) diff --git a/src/benchmarks/fd.py b/src/benchmarks/fd.py index bede21a..0d5657d 100644 --- a/src/benchmarks/fd.py +++ b/src/benchmarks/fd.py @@ -69,16 +69,16 @@ class BenchmarkFd(Benchmark): def summary(self): plt.barplot_single_arg(self, "{task-clock}", - ylabel='"runtime in ms"', - title='"fd runtime"', + ylabel="runtime in ms", + title="fd runtime", filepostfix="runtime") plt.export_stats_to_dataref(self, "task-clock") plt.barplot_single_arg(self, "{VmHWM}", - ylabel='"VmHWM in KB"', - title='"fd memusage"', + ylabel="VmHWM in KB", + title="fd memusage", filepostfix="memusage") plt.export_stats_to_dataref(self, "VmHWM") diff --git a/src/benchmarks/httpd.py b/src/benchmarks/httpd.py index 2a848c5..2138834 100644 --- a/src/benchmarks/httpd.py +++ b/src/benchmarks/httpd.py @@ -62,25 +62,25 @@ class BenchmarkHTTPD(Benchmark): def summary(self): plt.plot_fixed_arg(self, "{requests}", - xlabel='"threads"', - ylabel='"requests/s"', + xlabel="threads", + ylabel="requests/s", autoticks=False, filepostfix="requests", - title='perm.site + ": requests/s"') + title="{perm.site}: requests/s") plt.plot_fixed_arg(self, "{nginx_vmhwm}", - xlabel='"threads"', - ylabel='"VmHWM in KB"', - title='perm.site + ": nginx memory usage"', + xlabel="threads", + ylabel="VmHWM in KB", + title="{perm.site}: nginx memory usage", filepostfix="httpd_vmhwm", autoticks=False) plt.plot_fixed_arg(self, "{php-fpm_vmhwm}", - xlabel='"threads"', - ylabel='"VmHWM in KB"', - title='perm.site + ": php-fpm memory usage"', + xlabel="threads", + ylabel="VmHWM in KB", + title="{perm.site}: php-fpm memory usage", filepostfix="php-fpm_vmhwm", autoticks=False) diff --git a/src/benchmarks/larson.py b/src/benchmarks/larson.py index 8fce9ed..5f153ea 100644 --- a/src/benchmarks/larson.py +++ b/src/benchmarks/larson.py @@ -83,15 +83,15 @@ class BenchmarkLarson(Benchmark): # Plot threads->throughput and maxsize->throughput plt.plot_fixed_arg(self, "{throughput}/1000000", - ylabel="'MOPS/s'", - title="'Larson: ' + arg + ' ' + str(arg_value)", + ylabel="MOPS/s", + title="Larson: {arg} {arg_value}", filepostfix="throughput") plt.plot_fixed_arg( self, "({L1-dcache-load-misses}/{L1-dcache-loads})*100", - ylabel="'l1 cache misses in %'", - title="'Larson cache misses: ' + arg + ' ' + str(arg_value)", + ylabel="l1 cache misses in %", + title="Larson cache misses: {arg} {arg_value}", filepostfix="cachemisses") |
