From 6312f3575a2434fb8ff56df7c655c26740428082 Mon Sep 17 00:00:00 2001 From: Eugen Betke Date: Fri, 14 Dec 2018 19:07:31 +0100 Subject: [PATCH] Minor changes --- benchmark/mkdb.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/benchmark/mkdb.py b/benchmark/mkdb.py index 0ebc0f103..6e27a4957 100755 --- a/benchmark/mkdb.py +++ b/benchmark/mkdb.py @@ -80,14 +80,13 @@ def _parseSysCounters(fn:str): res[m.group(1).lower()] = int(m.group(2)) m = re.match("cpu([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)", line) - res['num'] = int(m.group(1)) - res['user'] = int(m.group(2)) - res['nice'] = int(m.group(3)) - res['system'] = int(m.group(4)) - res['idle'] = int(m.group(5)) - res['iowait'] = int(m.group(6)) - res['irq'] = int(m.group(7)) - res['softirq'] = int(m.group(8)) + stat['cpu%d' % int(m.group(1)]['user'] = int(m.group(2)) + stat['cpu%d' % int(m.group(1)]['nice'] = int(m.group(3)) + stat['cpu%d' % int(m.group(1)]['system'] = int(m.group(4)) + stat['cpu%d' % int(m.group(1)]['idle'] = int(m.group(5)) + stat['cpu%d' % int(m.group(1)]['iowait'] = int(m.group(6)) + stat['cpu%d' % int(m.group(1)]['irq'] = int(m.group(7)) + stat['cpu%d' % int(m.group(1)]['softirq'] = int(m.group(8)) if (m): res[m.group(1)] = int(m.group(2))