aboutsummaryrefslogtreecommitdiff
path: root/mysql.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2018-08-13 19:22:30 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2018-08-13 19:22:30 +0200
commitc4347a4dc5ea8e87cf6230addcdff5a5b54ab82b (patch)
treedf9c6e3ac2d535b26191d9c937c2efea5fcdfb99 /mysql.py
parent694dc9c80887c143a546b7988399a38e452d4bb6 (diff)
downloadallocbench-c4347a4dc5ea8e87cf6230addcdff5a5b54ab82b.tar.gz
allocbench-c4347a4dc5ea8e87cf6230addcdff5a5b54ab82b.zip
fix parsing of chattymallocs output
Diffstat (limited to 'mysql.py')
-rw-r--r--mysql.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mysql.py b/mysql.py
index 3dd2680..95feb80 100644
--- a/mysql.py
+++ b/mysql.py
@@ -155,7 +155,12 @@ class Benchmark_MYSQL( Benchmark ):
with open(log, "rb") as f:
hist = {}
for l in f.readlines():
- n = int(str(l).replace("chattymalloc: ", ""))
+ l = str(l, "utf-8").replace("chattymalloc: ", "")
+ try:
+ n = int(l)
+ except ValueError:
+ continue
+
if not n in hist:
hist[n] = 0
hist[n] += 1