diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dj_trace.py | 12 | ||||
| -rw-r--r-- | src/falsesharing.py | 6 | ||||
| -rw-r--r-- | src/larson.py | 11 | ||||
| -rw-r--r-- | src/loop.py | 15 | ||||
| -rw-r--r-- | src/mysql.py | 12 |
5 files changed, 22 insertions, 34 deletions
diff --git a/src/dj_trace.py b/src/dj_trace.py index 18509b3..21b9ddd 100644 --- a/src/dj_trace.py +++ b/src/dj_trace.py @@ -127,12 +127,10 @@ class Benchmark_DJ_Trace( Benchmark ): fname = functions[i] result["avg_" + fname] = to_int(res.group("time")) - def summary(self, sd=None): + def summary(self): args = self.results["args"] targets = self.results["targets"] - sd = sd or "" - # Total times for perm in self.iterate_args(args=args): for i, target in enumerate(targets): @@ -146,7 +144,7 @@ class Benchmark_DJ_Trace( Benchmark ): plt.legend(loc="best") plt.ylabel("Zeit in ms") plt.title("Gesamte Laufzeit") - plt.savefig(os.path.join(sd, ".".join([self.name, perm.workload, "runtime", "png"]))) + plt.savefig(".".join([self.name, perm.workload, "runtime", "png"])) plt.clf() # Function Times @@ -169,7 +167,7 @@ class Benchmark_DJ_Trace( Benchmark ): "free\n" + str(self.results[perm.workload]["free"]) + "\ncalls"]) plt.ylabel("Durchschnittliche Zeit in cycles") plt.title("Durchscnittliche Laufzeiten der API Funktionen") - plt.savefig(os.path.join(sd, ".".join([self.name, perm.workload, "apitimes", "png"]))) + plt.savefig(".".join([self.name, perm.workload, "apitimes", "png"])) plt.clf() # Memusage @@ -189,7 +187,7 @@ class Benchmark_DJ_Trace( Benchmark ): plt.legend(loc="best") plt.ylabel("Max RSS in MB") plt.title("Maximal benötigter Speicher (VmHWM)") - plt.savefig(os.path.join(sd, ".".join([self.name, perm.workload, "rss", "png"]))) + plt.savefig(".".join([self.name, perm.workload, "rss", "png"])) plt.clf() # Tables @@ -208,7 +206,7 @@ class Benchmark_DJ_Trace( Benchmark ): rssmin = min(rss) rssmax = max(rss) - fname = os.path.join(sd, ".".join([self.name, perm.workload, "table.tex"])) + fname = ".".join([self.name, perm.workload, "table.tex"]) with open(fname, "w") as f: print("\\begin{tabular}{| l | l | l |}" , file=f) print("& Zeit (ms) / $\\sigma$ (\\%) & VmHWM (KB) / $\\sigma$ (\\%) \\\\", file=f) diff --git a/src/falsesharing.py b/src/falsesharing.py index 1e0ef18..57acf06 100644 --- a/src/falsesharing.py +++ b/src/falsesharing.py @@ -29,7 +29,7 @@ class Benchmark_Falsesharing( Benchmark ): def process_output(self, result, stdout, stderr, target, perm, verbose): result["time"] = time_re.match(stdout).group("time") - def summary(self, sumdir=None): + def summary(self): # Speedup thrash args = self.results["args"] nthreads = args["threads"] @@ -56,21 +56,19 @@ class Benchmark_Falsesharing( Benchmark ): plt.xlabel("threads") plt.ylabel("speedup") plt.title(bench + " speedup" ) - plt.savefig(os.path.join(sumdir, self.name + "." + bench + ".png")) + plt.savefig(self.name + "." + bench + ".png") plt.clf() self.plot_fixed_arg("({L1-dcache-load-misses}/{L1-dcache-loads})*100", ylabel="'l1 cache misses in %'", title = "'cache misses: ' + arg + ' ' + str(arg_value)", filepostfix = "l1-misses", - sumdir=sumdir, fixed=["bench"]) self.plot_fixed_arg("({LLC-load-misses}/{LLC-loads})*100", ylabel="'l1 cache misses in %'", title = "'LLC misses: ' + arg + ' ' + str(arg_value)", filepostfix = "llc-misses", - sumdir=sumdir, fixed=["bench"]) falsesharing = Benchmark_Falsesharing() diff --git a/src/larson.py b/src/larson.py index 713818b..0a4a237 100644 --- a/src/larson.py +++ b/src/larson.py @@ -30,25 +30,22 @@ class Benchmark_Larson( Benchmark ): result["throughput"] = int(res.group("throughput")) return - def summary(self, sumdir): + def summary(self): # Plot threads->throughput and maxsize->throughput self.plot_fixed_arg("{throughput}/1000000", ylabel="'MOPS/s'", title = "'Larson: ' + arg + ' ' + str(arg_value)", - filepostfix = "throughput", - sumdir=sumdir) + filepostfix = "throughput") self.plot_fixed_arg("({L1-dcache-load-misses}/{L1-dcache-loads})*100", ylabel="'l1 cache misses in %'", title = "'Larson cache misses: ' + arg + ' ' + str(arg_value)", - filepostfix = "cachemisses", - sumdir=sumdir) + filepostfix = "cachemisses") # Memusage self.plot_fixed_arg("int({VmHWM})", ylabel='"VmHWM in kB"', title= '"Loop Memusage: " + arg + " " + str(arg_value)', - filepostfix="memusage", - sumdir=sumdir) + filepostfix="memusage") larson = Benchmark_Larson() diff --git a/src/loop.py b/src/loop.py index 9590710..d58b4e2 100644 --- a/src/loop.py +++ b/src/loop.py @@ -19,30 +19,27 @@ class Benchmark_Loop( Benchmark ): self.requirements = ["build/bench_loop"] super().__init__() - def summary(self, sumdir): + def summary(self): # Speed self.plot_fixed_arg("perm.nthreads / (float({task-clock})/1000)", ylabel = '"MOPS/cpu-second"', title = '"Loop: " + arg + " " + str(arg_value)', - filepostfix="time", - sumdir=sumdir) + filepostfix="time") # Memusage self.plot_fixed_arg("int({VmHWM})", ylabel='"VmHWM in kB"', title= '"Loop Memusage: " + arg + " " + str(arg_value)', - filepostfix="memusage", - sumdir=sumdir) + filepostfix="memusage") + # L1 cache misses self.plot_fixed_arg("({L1-dcache-load-misses}/{L1-dcache-loads})*100", ylabel='"L1 misses in %"', title= '"Loop l1 cache misses: " + arg + " " + str(arg_value)', - filepostfix="l1misses", - sumdir=sumdir) + filepostfix="l1misses") # Speed Matrix self.write_best_doublearg_tex_table("perm.nthreads / (float({task-clock})/1000)", - filepostfix="memusage.matrix", - sumdir=sumdir) + filepostfix="memusage.matrix") loop = Benchmark_Loop() diff --git a/src/mysql.py b/src/mysql.py index ac97998..6d19a97 100644 --- a/src/mysql.py +++ b/src/mysql.py @@ -186,7 +186,7 @@ class Benchmark_MYSQL( Benchmark ): return False print() - def summary(self, sd): + def summary(self): targets = self.results["targets"] args = self.results["args"] nthreads = list(args["nthreads"]) @@ -196,8 +196,7 @@ class Benchmark_MYSQL( Benchmark ): xlabel = '"threads"', ylabel = '"transactions"', title = '"sysbench oltp read only"', - filepostfix = "l.ro", - sumdir = sd) + filepostfix = "l.ro") # bar plot for i, target in enumerate(targets): @@ -214,7 +213,7 @@ class Benchmark_MYSQL( Benchmark ): plt.xticks(range(1, len(y_vals) + 1), self.results["args"]["nthreads"]) plt.ylabel("transactions") plt.title("sysbench oltp read only") - plt.savefig(os.path.join(sd, self.name + ".b.ro.png")) + plt.savefig(self.name + ".b.ro.png") plt.clf() # Memusage @@ -222,8 +221,7 @@ class Benchmark_MYSQL( Benchmark ): xlabel = '"threads"', ylabel = '"VmHWM in kB"', title = '"Memusage sysbench oltp read only"', - filepostfix = "ro.mem", - sumdir = sd) + filepostfix = "ro.mem") # Colored latex table showing transactions count d = {target: {} for target in targets} @@ -248,7 +246,7 @@ class Benchmark_MYSQL( Benchmark ): maxs[perm] = cmax mins[perm] = cmin - fname = os.path.join(sd, ".".join([self.name, "transactions.tex"])) + fname = ".".join([self.name, "transactions.tex"]) headers = [perm.nthreads for perm in self.iterate_args(args=args)] with open(fname, "w") as f: print("\\begin{tabular}{| l" + " l"*len(headers) + " |}" , file=f) |
