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):
|
def parseIorOutput(fn):
|
||||||
selffn = fn + ".json"
|
selffn = fn + ".json"
|
||||||
res = dict()
|
res = list()
|
||||||
with open(selffn) as f:
|
with open(selffn) as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
#print(json.dumps(data, indent=4))
|
#print(json.dumps(data, indent=4))
|
||||||
res.update(data['tests'][0]['Results'][0][0])
|
res = data['tests'][0]['Results']
|
||||||
#print(data['tests'][0]['Results'][0][0])
|
|
||||||
#print(res)
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,7 +124,7 @@ class DBWriter:
|
||||||
cols = ["%s %s" % (k,self.map[type(v)]) for k,v in data.items()]
|
cols = ["%s %s" % (k,self.map[type(v)]) for k,v in data.items()]
|
||||||
colnames = ','.join(cols)
|
colnames = ','.join(cols)
|
||||||
print(colnames)
|
print(colnames)
|
||||||
query = 'CREATE TABLE p (%s, primary key(filename))' % colnames
|
query = 'CREATE TABLE p (%s, primary key(filename,iteration))' % colnames
|
||||||
try:
|
try:
|
||||||
self.conn.execute(query)
|
self.conn.execute(query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -158,14 +156,17 @@ def main():
|
||||||
for filename in glob.glob(folder + "/*.txt"):
|
for filename in glob.glob(folder + "/*.txt"):
|
||||||
print("Parsing " + filename)
|
print("Parsing " + filename)
|
||||||
data = dict()
|
data = dict()
|
||||||
data.update(splitFn(filename))
|
ior_result = parseIorOutput(filename)
|
||||||
data.update(parseSysCounters(filename))
|
for i in range(0, len(ior_result)):
|
||||||
data.update(parseIorOutput(filename))
|
data.update(splitFn(filename))
|
||||||
if not tabexists:
|
data.update(parseSysCounters(filename))
|
||||||
print(data)
|
data.update(ior_result[i][0])
|
||||||
db.create(data)
|
data['iteration'] = i
|
||||||
tabexists = True
|
if not tabexists:
|
||||||
db.insert(data)
|
print(data)
|
||||||
|
db.create(data)
|
||||||
|
tabexists = True
|
||||||
|
db.insert(data)
|
||||||
|
|
||||||
print(data)
|
print(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