diff options
Diffstat (limited to 'src/benchmarks')
| -rw-r--r-- | src/benchmarks/dj_trace.py | 18 | ||||
| -rw-r--r-- | src/benchmarks/falsesharing.py | 4 | ||||
| -rw-r--r-- | src/benchmarks/lld.py | 3 |
3 files changed, 15 insertions, 10 deletions
diff --git a/src/benchmarks/dj_trace.py b/src/benchmarks/dj_trace.py index 0e9ee74..3f87e86 100644 --- a/src/benchmarks/dj_trace.py +++ b/src/benchmarks/dj_trace.py @@ -25,6 +25,8 @@ from urllib.request import urlretrieve import matplotlib.pyplot as plt import numpy as np +from src.globalvars import summary_file_ext + from src.artifact import ArchiveArtifact from src.benchmark import Benchmark from src.util import print_status @@ -156,7 +158,7 @@ class BenchmarkDJTrace(Benchmark): plt.legend(loc="best") plt.ylabel("Zeit in ms") plt.title("Gesamte Laufzeit") - plt.savefig(".".join([self.name, perm.workload, "runtime", "png"])) + plt.savefig(".".join([self.name, perm.workload, "runtime", summary_file_ext])) plt.clf() self.barplot_single_arg("{cputime}/1000", @@ -190,7 +192,7 @@ class BenchmarkDJTrace(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(".".join([self.name, perm.workload, "apitimes", "png"])) + plt.savefig(".".join([self.name, perm.workload, "apitimes", summary_file_ext])) plt.clf() # Memusage @@ -227,7 +229,7 @@ class BenchmarkDJTrace(Benchmark): plt.legend(loc="best") plt.ylabel("Max RSS in MB") plt.title("Maximal benötigter Speicher (VmHWM)") - plt.savefig(".".join([self.name, perm.workload, "rss", "png"])) + plt.savefig(".".join([self.name, perm.workload, "rss", summary_file_ext])) plt.clf() self.export_stats_to_csv("Max_RSS") @@ -245,12 +247,12 @@ class BenchmarkDJTrace(Benchmark): d[allocator]["rss"] = [x["Max_RSS"] for x in self.results[allocator][perm]] times = {allocator: np.mean(d[allocator]["time"]) for allocator in allocators} - tmin = min(times) - tmax = max(times) + tmin = min(times.values()) + tmax = max(times.values()) rss = {allocator: np.mean(d[allocator]["rss"]) for allocator in allocators} - rssmin = min(rss) - rssmax = max(rss) + rssmin = min(rss.values()) + rssmax = max(rss.values()) fname = ".".join([self.name, perm.workload, "table.tex"]) with open(fname, "w") as f: @@ -264,7 +266,7 @@ class BenchmarkDJTrace(Benchmark): for allocator in allocators: print(allocator.replace("_", "\\_"), end=" & ", file=f) - s = "\\textcolor{{{}}}{{{}}} / {}" + s = "\\textcolor{{{}}}{{{:.2f}}} / {:.4f}" t = d[allocator]["time"] m = times[allocator] diff --git a/src/benchmarks/falsesharing.py b/src/benchmarks/falsesharing.py index a9c72b5..b7222f6 100644 --- a/src/benchmarks/falsesharing.py +++ b/src/benchmarks/falsesharing.py @@ -23,6 +23,8 @@ import matplotlib.pyplot as plt import numpy as np from src.benchmark import Benchmark +from src.globalvars import summary_file_ext + TIME_RE = re.compile("^Time elapsed = (?P<time>\\d*\\.\\d*) seconds.$") @@ -77,7 +79,7 @@ class BenchmarkFalsesharing(Benchmark): plt.xlabel("threads") plt.ylabel("speedup") plt.title(bench + " speedup") - plt.savefig(self.name + "." + bench + ".png") + plt.savefig(f"{self.name}.{bench}.{summary_file_ext}") plt.clf() self.plot_fixed_arg("({L1-dcache-load-misses}/{L1-dcache-loads})*100", diff --git a/src/benchmarks/lld.py b/src/benchmarks/lld.py index df19ebf..1c30ce0 100644 --- a/src/benchmarks/lld.py +++ b/src/benchmarks/lld.py @@ -205,6 +205,7 @@ import matplotlib.pyplot as plt from src.artifact import ArchiveArtifact from src.benchmark import Benchmark import src.facter +from src.globalvars import summary_file_ext class BenchmarkLld(Benchmark): @@ -257,7 +258,7 @@ class BenchmarkLld(Benchmark): plt.legend(loc="best") plt.ylabel("Zeit in ms") plt.title(f"Gesamte Laufzeit {perm.test}") - plt.savefig(".".join([self.name, perm.test, "runtime", "png"])) + plt.savefig(".".join([self.name, perm.test, "runtime", summary_file_ext])) plt.clf() # TODO: get memusage |
