diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2018-07-20 15:49:05 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2018-07-20 15:49:05 +0200 |
| commit | 25f5be955a1b4313e928f8f4125a5c761b6e6b3b (patch) | |
| tree | 60046647e526171f54008bd5dffb838da41ef389 /bench_mysql.py | |
| parent | 78098dbe189ae84b38cf6c94cbe06dafd07cb10c (diff) | |
| download | allocbench-25f5be955a1b4313e928f8f4125a5c761b6e6b3b.tar.gz allocbench-25f5be955a1b4313e928f8f4125a5c761b6e6b3b.zip | |
fix results for mysql
Diffstat (limited to 'bench_mysql.py')
| -rw-r--r-- | bench_mysql.py | 49 |
1 files changed, 4 insertions, 45 deletions
diff --git a/bench_mysql.py b/bench_mysql.py index 0627537..fc0074a 100644 --- a/bench_mysql.py +++ b/bench_mysql.py @@ -32,8 +32,9 @@ class Benchmark_MYSQL( Benchmark ): self.targets = copy.copy(common_targets) del(self.targets["klmalloc"]) self.nthreads = range(1, multiprocessing.cpu_count() * 2 + 1) - - self.results = {} + + self.results = {"args": {"nthreads" : self.nthreads}, + "targets" : self.targets} def start_and_wait_for_server(self, env, verbose, log=None): if not log: @@ -169,47 +170,5 @@ class Benchmark_MYSQL( Benchmark ): plt.title("sysbench oltp read only") plt.savefig("mysql.ro.png") plt.clf() - # MAXSIZE fixed - # for size in self.maxsize: - # for target in self.targets: - # y_vals = [0] * len(self.nthreads) - # for mid, measures in self.results.items(): - # if mid[0] == target and mid[2] == size: - # d = [] - # for m in measures: - # # nthreads/time = MOPS/S - # d.append(mid[1]/float(m["cpu-clock:ku"])) - # y_vals[mid[1]-1] = np.mean(d) - # plt.plot(self.nthreads, y_vals, label=target) - - # plt.legend() - # plt.xlabel("threads") - # plt.ylabel("MOPS/s") - # plt.title("Loop: " + str(size) + "B") - # plt.savefig("Loop." + str(size) + "B.png") - # plt.clf() - - # # NTHREADS fixed - # y_mapping = {v : i for i, v in enumerate(self.maxsize)} - # x_vals = [i + 1 for i in range(0, len(self.maxsize))] - # for n in self.nthreads: - # for target in self.targets: - # y_vals = [0] * len(self.maxsize) - # for mid, measures in self.results.items(): - # if mid[0] == target and mid[1] == n: - # d = [] - # for m in measures: - # # nthreads/time = MOPS/S - # d.append(n/float(m["cpu-clock:ku"])) - # y_vals[y_mapping[mid[2]]] = np.mean(d) - # plt.plot(x_vals, y_vals, label=target) - - # plt.legend() - # plt.xticks(x_vals, self.maxsize) - # plt.xlabel("size in B") - # plt.ylabel("MOPS/s") - # plt.title("Loop: " + str(n) + "thread(s)") - # plt.savefig("Loop." + str(n) + "thread.png") - # plt.clf() - + mysql = Benchmark_MYSQL() |
