diff --git a/benchmark/mkdb.py b/benchmark/mkdb.py index 66b96075f..cc6c55f69 100755 --- a/benchmark/mkdb.py +++ b/benchmark/mkdb.py @@ -34,13 +34,11 @@ def splitFn(fn:str): def parseIorOutput(fn): selffn = fn + ".json" - res = dict() + res = list() with open(selffn) as f: data = json.load(f) #print(json.dumps(data, indent=4)) - res.update(data['tests'][0]['Results'][0][0]) - #print(data['tests'][0]['Results'][0][0]) - #print(res) + res = data['tests'][0]['Results'] return res @@ -126,7 +124,7 @@ class DBWriter: cols = ["%s %s" % (k,self.map[type(v)]) for k,v in data.items()] colnames = ','.join(cols) print(colnames) - query = 'CREATE TABLE p (%s, primary key(filename))' % colnames + query = 'CREATE TABLE p (%s, primary key(filename,iteration))' % colnames try: self.conn.execute(query) except Exception as e: @@ -158,14 +156,17 @@ def main(): for filename in glob.glob(folder + "/*.txt"): print("Parsing " + filename) data = dict() - data.update(splitFn(filename)) - data.update(parseSysCounters(filename)) - data.update(parseIorOutput(filename)) - if not tabexists: - print(data) - db.create(data) - tabexists = True - db.insert(data) + ior_result = parseIorOutput(filename) + for i in range(0, len(ior_result)): + data.update(splitFn(filename)) + data.update(parseSysCounters(filename)) + data.update(ior_result[i][0]) + data['iteration'] = i + if not tabexists: + print(data) + db.create(data) + tabexists = True + db.insert(data) print(data) diff --git a/benchmark/print_ime_results.sh b/benchmark/print_ime_results.sh new file mode 100644 index 000000000..7c91ccd0d --- /dev/null +++ b/benchmark/print_ime_results.sh @@ -0,0 +1 @@ +sqlite3 results.db "select * from p where api=\"ime\" and iteration<3 and access==\"write\" order by t,iteration" | column -s"|" -t | head diff --git a/benchmark/results.db b/benchmark/results.db index c7a6d97a5..a10cec802 100644 Binary files a/benchmark/results.db and b/benchmark/results.db differ