- with open(f"{file_to_read}", u"rt") as input:
- data = data + input.readlines()
- file_name = \
- f"{spec.cpta[u'output-file']}/regressions-{job_name}.txt"
- with open(file_name, u'w') as txt_file:
- for test_name, classification in job_data.items():
- if classification == u"regression":
- if u"2n" in test_name:
- test_name = test_name.split("-", 2)
- tst = test_name[2].split(".")[-1]
- nic = test_name[1]
- tst_name = f"{nic}-{tst}"
- else:
- test_name = test_name.split("-", 1)
- tst = test_name[1].split(".")[-1]
- nic = test_name[0].split(".")[-1]
- tst_name = f"{nic}-{tst}"
-
- for line in data:
- if tst_name in line:
- line = line.replace(" ", "")
- trend = line.split("|")[2]
- number = line.split("|")[3]
- ltc = line.split("|")[4]
- txt_file.write(f"{tst_name} [ {trend}M | "
- f"#{number} | {ltc}% ]\n")
+ with open(f"{file_to_read}", u"rt") as f_in:
+ data = data + f_in.readlines()
+
+ for test_name, classification in job_data.items():
+ if classification != u"normal":
+ if u"2n" in test_name:
+ test_name = test_name.split("-", 2)
+ tst = test_name[2].split(".")[-1]
+ nic = test_name[1]
+ else:
+ test_name = test_name.split("-", 1)
+ tst = test_name[1].split(".")[-1]
+ nic = test_name[0].split(".")[-1]
+ frmsize = tst.split("-")[0]
+ tst = u"-".join(tst.split("-")[1:])
+ tst_name = f"{nic}-{frmsize}-{tst}"
+ if len(tst) > max_len.tst:
+ max_len.tst = len(tst)
+ if len(nic) > max_len.nic:
+ max_len.nic = len(nic)
+ if len(frmsize) > max_len.frmsize:
+ max_len.frmsize = len(frmsize)
+
+ for line in data:
+ if tst_name in line:
+ line = line.replace(" ", "")
+ trend = line.split("|")[2]
+ if len(str(trend)) > max_len.trend:
+ max_len.trend = len(str(trend))
+ number = line.split("|")[3]
+ if len(str(number)) > max_len.run:
+ max_len.run = len(str(number))
+ ltc = line.split("|")[4]
+ if len(str(ltc)) > max_len.ltc:
+ max_len.ltc = len(str(ltc))
+ if classification == u'regression':
+ test_reg_lst.append(tst)
+ nic_reg_lst.append(nic)
+ frmsize_reg_lst.append(frmsize)
+ trend_reg_lst.append(trend)
+ number_reg_lst.append(number)
+ ltc_reg_lst.append(ltc)
+ elif classification == u'progression':
+ test_prog_lst.append(tst)
+ nic_prog_lst.append(nic)
+ frmsize_prog_lst.append(frmsize)
+ trend_prog_lst.append(trend)
+ number_prog_lst.append(number)
+ ltc_prog_lst.append(ltc)