aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2018-08-13 22:42:48 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2018-08-13 22:42:48 +0200
commit063be4c23a572f1954874928df797cb1bd04f1ae (patch)
tree6d731847a8a4467f36d7d3be62513d080f4295c8
parentd02fa97af8aa6ae4c41707a8ea356ffc87bfa012 (diff)
downloadallocbench-063be4c23a572f1954874928df797cb1bd04f1ae.tar.gz
allocbench-063be4c23a572f1954874928df797cb1bd04f1ae.zip
only print histogram
-rw-r--r--mysql.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/mysql.py b/mysql.py
index b511aff..9baf4e3 100644
--- a/mysql.py
+++ b/mysql.py
@@ -153,7 +153,7 @@ class Benchmark_MYSQL( Benchmark ):
if tname == "chattymalloc":
with open(log, "rb") as f:
- sizes = []
+ hist = {}
for l in f.readlines():
l = str(l, "utf-8").replace("chattymalloc: ", "")
try:
@@ -161,8 +161,10 @@ class Benchmark_MYSQL( Benchmark ):
except ValueError:
continue
- sizes.append(n)
- result["sizes"] = sizes
+ if not n in hist:
+ hist[n] = 0
+ hist[n] += 1
+ result["hist"] = hist
else:
result["transactions"] = re.search("transactions:\s*(\d*)", p.stdout).group(1)
result["queries"] = re.search("queries:\s*(\d*)", p.stdout).group(1)
@@ -202,6 +204,8 @@ class Benchmark_MYSQL( Benchmark ):
y_mapping = {v: i for i, v in enumerate(nthreads)}
for target in targets:
+ if target == "chattymalloc":
+ continue
y_vals = [0] * len(nthreads)
for mid, measures in self.results.items():
if mid[0] == target:
@@ -245,11 +249,10 @@ class Benchmark_MYSQL( Benchmark ):
for mid, measures in self.results.items():
if mid[0] == "chattymalloc":
- plt.hist(measures["sizes"])
- plt.xlabel("sizes")
- plt.title("sysbench oltp read only: " + str(mid[1]) + "threads")
- plt.savefig(self.name + "hist." + str(mid[1]) + ".ro.png")
- plt.clf()
+ hist = [(n, s) for s,n measures[0]["hist"].items()]
+ hist.sort()
+ print("Histogram for", mid[1], "threads:")
+ print(hist)
# memusage
for target, measures in self.results["memusage"].items():