+ data_time_period = \
+ (datetime.utcnow() - self._data["start_time"].min()).days
+ if self._time_period > data_time_period:
+ self._time_period = data_time_period
+
+
+ # Get structure of tests:
+ tbs = dict()
+ for _, row in self._data[["job", "test_id"]].drop_duplicates().\
+ iterrows():
+ lst_job = row["job"].split("-")
+ dut = lst_job[1]
+ ttype = lst_job[3]
+ tbed = "-".join(lst_job[-2:])
+ lst_test = row["test_id"].split(".")
+ if dut == "dpdk":
+ area = "dpdk"
+ else:
+ area = "-".join(lst_test[3:-2])
+ suite = lst_test[-2].replace("2n1l-", "").replace("1n1l-", "").\
+ replace("2n-", "")
+ test = lst_test[-1]
+ nic = suite.split("-")[0]
+ for drv in self.DRIVERS:
+ if drv in test:
+ if drv == "af-xdp":
+ driver = "af_xdp"
+ else:
+ driver = drv
+ test = test.replace(f"{drv}-", "")
+ break
+ else:
+ driver = "dpdk"
+ infra = "-".join((tbed, nic, driver))
+ lst_test = test.split("-")
+ framesize = lst_test[0]
+ core = lst_test[1] if lst_test[1] else "8C"
+ test = "-".join(lst_test[2: -1])
+
+ if tbs.get(dut, None) is None:
+ tbs[dut] = dict()
+ if tbs[dut].get(infra, None) is None:
+ tbs[dut][infra] = dict()
+ if tbs[dut][infra].get(area, None) is None:
+ tbs[dut][infra][area] = dict()
+ if tbs[dut][infra][area].get(test, None) is None:
+ tbs[dut][infra][area][test] = dict()
+ tbs[dut][infra][area][test]["core"] = list()
+ tbs[dut][infra][area][test]["frame-size"] = list()
+ tbs[dut][infra][area][test]["test-type"] = list()
+ if core.upper() not in tbs[dut][infra][area][test]["core"]:
+ tbs[dut][infra][area][test]["core"].append(core.upper())
+ if framesize.upper() not in \
+ tbs[dut][infra][area][test]["frame-size"]:
+ tbs[dut][infra][area][test]["frame-size"].append(
+ framesize.upper())
+ if ttype == "mrr":
+ if "MRR" not in tbs[dut][infra][area][test]["test-type"]:
+ tbs[dut][infra][area][test]["test-type"].append("MRR")
+ elif ttype == "ndrpdr":
+ if "NDR" not in tbs[dut][infra][area][test]["test-type"]:
+ tbs[dut][infra][area][test]["test-type"].extend(
+ ("NDR", "PDR"))
+ self._spec_tbs = tbs
+