This commit is contained in:
stubbfel
2017-11-29 00:12:49 +01:00
parent e026cd0174
commit 75f4edfccc
5 changed files with 3619 additions and 28 deletions

View File

@@ -116,6 +116,88 @@ def summaryCNPN(files, output, outputSca):
csv.writeCSV(output, summaryTabele)
scalTable.append([])
for colindex in range(0, len(summaryTabele[0])):
meanVar = csv.aggrateCol(colindex, summaryTabele)
scalTable[-1].append(str(meanVar[0]))
scalTable[-1].append(str(meanVar[1]))
for row in scalTable:
print(row)
csv.writeCSV(outputSca, scalTable)
def summaryRuntime(files, output, outputSca):
summaryTabele = [[]]
scalTable = [[]]
firstfile = True
for fileName in files:
fileTable = csv.readCSV(fileName)
if firstfile:
firstfile = False
for head in fileTable[0]:
summaryTabele[0].append(head)
scalTable[0].append("Mean:"+head)
scalTable[0].append("Var:"+head)
continue
for row in fileTable:
if csv.is_number(row[0]):
summaryTabele.append(row)
summaryTabele[0].append("Aggregate")
scalTable[0].append("Mean:Aggregate")
scalTable[0].append("Var:Aggregate")
for row in summaryTabele:
if csv.is_number(row[0]):
row.append(str(float(csv.aggrateRow(row, -1))))
print(summaryTabele)
csv.writeCSV(output, summaryTabele)
scalTable.append([])
for colindex in range(0, len(summaryTabele[0])):
meanVar = csv.aggrateCol(colindex, summaryTabele)
scalTable[-1].append(str(meanVar[0]))
scalTable[-1].append(str(meanVar[1]))
for row in scalTable:
print(row)
csv.writeCSV(outputSca, scalTable)
def summaryMsgCount(files, output, outputSca):
summaryTabele = [[]]
scalTable = [[]]
firstfile = True
for fileName in files:
fileTable = csv.readCSV(fileName)
if firstfile:
firstfile = False
for head in fileTable[0]:
summaryTabele[0].append(head)
scalTable[0].append("Mean:"+head)
scalTable[0].append("Var:"+head)
continue
for row in fileTable:
if csv.is_number(row[0]):
summaryTabele.append(row)
summaryTabele[0].append("Aggregate")
scalTable[0].append("Mean:Aggregate")
scalTable[0].append("Var:Aggregate")
for row in summaryTabele:
if csv.is_number(row[0]):
row.append(str(float(csv.aggrateRow(row, -1))))
print(summaryTabele)
csv.writeCSV(output, summaryTabele)
scalTable.append([])
for colindex in range(0, len(summaryTabele[0])):
meanVar = csv.aggrateCol(colindex, summaryTabele)
@@ -192,6 +274,36 @@ summaryRTT(glob.glob("xx5-rtt.csv-testpatt-*.csv"),"AGxx5-rtt.csv", "scaxx5-rtt.
summaryRTT(glob.glob("xx7-rtt.csv-testpatt-*.csv"),"AGxx7-rtt.csv", "scaxx7-rtt.csv")
summaryRTT(glob.glob("all-rtt.csv-testpatt-*.csv"),"AGall-rtt.csv", "scaall-rtt.csv")
summaryRuntime(glob.glob("0xx-runtime.csv-testpatt-*.csv"),"AG0xx-runtime.csv", "sca0xx-runtime.csv")
summaryRuntime(glob.glob("1xx-runtime.csv-testpatt-*.csv"),"AG1xx-runtime.csv", "sca1xx-runtime.csv")
summaryRuntime(glob.glob("2xx-runtime.csv-testpatt-*.csv"),"AG2xx-runtime.csv", "sca2xx-runtime.csv")
summaryRuntime(glob.glob("x0x-runtime.csv-testpatt-*.csv"),"AGx0x-runtime.csv", "scax0x-runtime.csv")
summaryRuntime(glob.glob("x1x-runtime.csv-testpatt-*.csv"),"AGx1x-runtime.csv", "scax1x-runtime.csv")
summaryRuntime(glob.glob("x2x-runtime.csv-testpatt-*.csv"),"AGx2x-runtime.csv", "scax2x-runtime.csv")
summaryRuntime(glob.glob("xx0-runtime.csv-testpatt-*.csv"),"AGxx0-runtime.csv", "scaxx0-runtime.csv")
summaryRuntime(glob.glob("xx1-runtime.csv-testpatt-*.csv"),"AGxx1-runtime.csv", "scaxx1-runtime.csv")
summaryRuntime(glob.glob("xx2-runtime.csv-testpatt-*.csv"),"AGxx2-runtime.csv", "scaxx2-runtime.csv")
summaryRuntime(glob.glob("xx3-runtime.csv-testpatt-*.csv"),"AGxx3-runtime.csv", "scaxx3-runtime.csv")
summaryRuntime(glob.glob("xx4-runtime.csv-testpatt-*.csv"),"AGxx4-runtime.csv", "scaxx4-runtime.csv")
summaryRuntime(glob.glob("xx5-runtime.csv-testpatt-*.csv"),"AGxx5-runtime.csv", "scaxx5-runtime.csv")
summaryRuntime(glob.glob("xx7-runtime.csv-testpatt-*.csv"),"AGxx7-runtime.csv", "scaxx7-runtime.csv")
summaryRuntime(glob.glob("all-runtime.csv-testpatt-*.csv"),"AGall-runtime.csv", "scaall-runtime.csv")
summaryMsgCount(glob.glob("0xx-mgs.csv-testpatt-*.csv"),"AG0xx-mgs.csv", "sca0xx-mgs.csv")
summaryMsgCount(glob.glob("1xx-mgs.csv-testpatt-*.csv"),"AG1xx-mgs.csv", "sca1xx-mgs.csv")
summaryMsgCount(glob.glob("2xx-mgs.csv-testpatt-*.csv"),"AG2xx-mgs.csv", "sca2xx-mgs.csv")
summaryMsgCount(glob.glob("x0x-mgs.csv-testpatt-*.csv"),"AGx0x-mgs.csv", "scax0x-mgs.csv")
summaryMsgCount(glob.glob("x1x-mgs.csv-testpatt-*.csv"),"AGx1x-mgs.csv", "scax1x-mgs.csv")
summaryMsgCount(glob.glob("x2x-mgs.csv-testpatt-*.csv"),"AGx2x-mgs.csv", "scax2x-mgs.csv")
summaryMsgCount(glob.glob("xx0-mgs.csv-testpatt-*.csv"),"AGxx0-mgs.csv", "scaxx0-mgs.csv")
summaryMsgCount(glob.glob("xx1-mgs.csv-testpatt-*.csv"),"AGxx1-mgs.csv", "scaxx1-mgs.csv")
summaryMsgCount(glob.glob("xx2-mgs.csv-testpatt-*.csv"),"AGxx2-mgs.csv", "scaxx2-mgs.csv")
summaryMsgCount(glob.glob("xx3-mgs.csv-testpatt-*.csv"),"AGxx3-mgs.csv", "scaxx3-mgs.csv")
summaryMsgCount(glob.glob("xx4-mgs.csv-testpatt-*.csv"),"AGxx4-mgs.csv", "scaxx4-mgs.csv")
summaryMsgCount(glob.glob("xx5-mgs.csv-testpatt-*.csv"),"AGxx5-mgs.csv", "scaxx5-mgs.csv")
summaryMsgCount(glob.glob("xx7-mgs.csv-testpatt-*.csv"),"AGxx7-mgs.csv", "scaxx7-mgs.csv")
summaryMsgCount(glob.glob("all-mgs.csv-testpatt-*.csv"),"AGall-mgs.csv", "scaall-mgs.csv")
summaryCNPN(glob.glob("0xx-cnpn.csv-testpatt-*.csv"),"AG0xx-cnpn.csv", "sca0xx-cnpn.csv")
summaryCNPN(glob.glob("1xx-cnpn.csv-testpatt-*.csv"),"AG1xx-cnpn.csv", "sca1xx-cnpn.csv")
summaryCNPN(glob.glob("2xx-cnpn.csv-testpatt-*.csv"),"AG2xx-cnpn.csv", "sca2xx-cnpn.csv")