X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Finput_data_parser.py;h=c63e3eb7828d80677af9ac741c548d0550317dbc;hb=46dfac2e291a0e8ddbae496776d7c0aa7c460330;hp=2416e057c86106c7339c59391b3e56f0fb30602c;hpb=ac2c84d9561e2344057dc5d4173b0c7718015c4b;p=csit.git diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index 2416e057c8..c63e3eb782 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -283,7 +283,7 @@ class ExecutionChecker(ResultVisitor): REGEX_VERSION_DPDK = re.compile(r"(DPDK version:\s*|DPDK Version:\s*)(.*)") - REGEX_TCP = re.compile(r'Total\s(rps|cps|throughput):\s([0-9]*).*$') + REGEX_TCP = re.compile(r'Total\s(rps|cps|throughput):\s(\d*).*$') REGEX_MRR = re.compile(r'MaxReceivedRate_Results\s\[pkts/(\d*)sec\]:\s' r'tx\s(\d*),\srx\s(\d*)') @@ -291,13 +291,16 @@ class ExecutionChecker(ResultVisitor): REGEX_BMRR = re.compile(r'Maximum Receive Rate trial results' r' in packets per second: \[(.*)\]') + REGEX_RECONF_LOSS = re.compile(r'Packets lost due to reconfig: (\d*)') + REGEX_RECONF_TIME = re.compile(r'Implied time lost: (\d*.[\de-]*)') + REGEX_TC_TAG = re.compile(r'\d+[tT]\d+[cC]') REGEX_TC_NAME_OLD = re.compile(r'-\d+[tT]\d+[cC]-') REGEX_TC_NAME_NEW = re.compile(r'-\d+[cC]-') - REGEX_TC_NUMBER = re.compile(r'tc[0-9]{2}-') + REGEX_TC_NUMBER = re.compile(r'tc\d{2}-') def __init__(self, metadata, mapping, ignore): """Initialisation. @@ -457,7 +460,7 @@ class ExecutionChecker(ResultVisitor): self._data["tests"][self._test_ID]["conf-history"] = str() else: self._msg_type = None - text = re.sub("[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} " + text = re.sub("\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} " "VAT command history:", "", msg.message, count=1). \ replace("\n\n", "\n").replace('\n', ' |br| ').\ replace('\r', '').replace('"', "'") @@ -479,7 +482,7 @@ class ExecutionChecker(ResultVisitor): self._data["tests"][self._test_ID]["conf-history"] = str() else: self._msg_type = None - text = re.sub("[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} " + text = re.sub("\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} " "PAPI command history:", "", msg.message, count=1). \ replace("\n\n", "\n").replace('\n', ' |br| ').\ replace('\r', '').replace('"', "'") @@ -802,6 +805,7 @@ class ExecutionChecker(ResultVisitor): groups = re.search(self.REGEX_TC_NAME_OLD, self._test_ID) if not groups: tag_count = 0 + tag_tc = str() for tag in test_result["tags"]: groups = re.search(self.REGEX_TC_TAG, tag) if groups: @@ -830,7 +834,8 @@ class ExecutionChecker(ResultVisitor): "SOAK" in tags or "TCP" in tags or "MRR" in tags or - "BMRR" in tags): + "BMRR" in tags or + "RECONF" in tags): # TODO: Remove when definitely no NDRPDRDISC tests are used: if "NDRDISC" in tags: test_result["type"] = "NDR" @@ -847,6 +852,8 @@ class ExecutionChecker(ResultVisitor): test_result["type"] = "MRR" elif "FRMOBL" in tags or "BMRR" in tags: test_result["type"] = "BMRR" + elif "RECONF" in tags: + test_result["type"] = "RECONF" else: test_result["status"] = "FAIL" self._data["tests"][self._test_ID] = test_result @@ -908,6 +915,18 @@ class ExecutionChecker(ResultVisitor): AvgStdevMetadataFactory.from_data([ float(groups.group(3)) / float(groups.group(1)), ]) + elif test_result["type"] == "RECONF": + test_result["result"] = None + try: + grps_loss = re.search(self.REGEX_RECONF_LOSS, test.message) + grps_time = re.search(self.REGEX_RECONF_TIME, test.message) + test_result["result"] = { + "loss": int(grps_loss.group(1)), + "time": float(grps_time.group(1)) + } + except (AttributeError, IndexError, ValueError, TypeError): + test_result["status"] = "FAIL" + self._data["tests"][self._test_ID] = test_result def end_test(self, test):