aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2018-07-15 16:34:25 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2018-07-15 16:34:25 +0200
commit9ef16832c7898b4d0af18fc12f1d11e24c4c925c (patch)
tree74c51b8c2af16a78b20ef4e78912497684a52db2
parent0d6091831f64ebcb28fe4f495ca21815f0ddb0a6 (diff)
downloadallocbench-9ef16832c7898b4d0af18fc12f1d11e24c4c925c.tar.gz
allocbench-9ef16832c7898b4d0af18fc12f1d11e24c4c925c.zip
add point markers to plots and fix targets
-rw-r--r--bench_conprod.py4
-rw-r--r--bench_loop.py4
-rw-r--r--bench_mysql.py6
3 files changed, 7 insertions, 7 deletions
diff --git a/bench_conprod.py b/bench_conprod.py
index a47a8e6..44da48a 100644
--- a/bench_conprod.py
+++ b/bench_conprod.py
@@ -109,7 +109,7 @@ class Benchmark_ConProd():
# 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.plot(self.nthreads, y_vals, label=target, linestyle='-', marker='.')
plt.legend()
plt.xlabel("consumers/producers")
@@ -131,7 +131,7 @@ class Benchmark_ConProd():
# 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.plot(x_vals, y_vals, label=target, linestyle='-', marker='.')
plt.legend()
plt.xticks(x_vals, self.maxsize)
diff --git a/bench_loop.py b/bench_loop.py
index 8f11b61..dcffa7f 100644
--- a/bench_loop.py
+++ b/bench_loop.py
@@ -109,7 +109,7 @@ class Benchmark_Loop():
# 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.plot(self.nthreads, y_vals, marker='.',linestyle='-', label=target)
plt.legend()
plt.xlabel("threads")
@@ -131,7 +131,7 @@ class Benchmark_Loop():
# 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.plot(x_vals, y_vals, marker='.', linestyle='-', label=target)
plt.legend()
plt.xticks(x_vals, self.maxsize)
diff --git a/bench_mysql.py b/bench_mysql.py
index 5312c89..59f5752 100644
--- a/bench_mysql.py
+++ b/bench_mysql.py
@@ -1,5 +1,5 @@
+import copy
import csv
-import io
import matplotlib.pyplot as plt
import multiprocessing
import numpy as np
@@ -27,7 +27,7 @@ class Benchmark_MYSQL():
def __init__(self):
self.name = "MYSQL Stress Benchmark"
self.descrition = """See sysbench documentation."""
- self.targets = common_targets
+ self.targets = copy.copy(common_targets)
del(self.targets["klmalloc"])
self.nthreads = range(1, multiprocessing.cpu_count() * 2 + 1)
@@ -156,7 +156,7 @@ class Benchmark_MYSQL():
for m in measures:
d.append(int(m["transactions"]))
y_vals[mid[1]-1] = np.mean(d)
- plt.plot(self.nthreads, y_vals, label=target)
+ plt.plot(self.nthreads, y_vals, label=target, linestyle='-', marker='.')
plt.legend()
plt.xlabel("threads")