aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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