From 5d6a470ce0c7d334205293de9b596a5ea4eb2e8c Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 11 Feb 2020 14:22:07 +0100 Subject: cleanup plot code * use str.format instead of eval for plot labels * use meaningful variable names * add license header * add some doc strings --- src/benchmarks/falsesharing.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/benchmarks/falsesharing.py') 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"]) -- cgit v1.2.3