Merge branch 'master' of http://git.hps.vi4io.org/eugen.betke/ddn-ime-evaluation
This commit is contained in:
commit
751a0c2593
|
@ -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,9 +156,12 @@ def main():
|
|||
for filename in glob.glob(folder + "/*.txt"):
|
||||
print("Parsing " + filename)
|
||||
data = dict()
|
||||
ior_result = parseIorOutput(filename)
|
||||
for i in range(0, len(ior_result)):
|
||||
data.update(splitFn(filename))
|
||||
data.update(parseSysCounters(filename))
|
||||
data.update(parseIorOutput(filename))
|
||||
data.update(ior_result[i][0])
|
||||
data['iteration'] = i
|
||||
if not tabexists:
|
||||
print(data)
|
||||
db.create(data)
|
||||
|
|
|
@ -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
|
Binary file not shown.
Loading…
Reference in New Issue