feat(etl): 2306
[csit.git] / resources / tools / presentation / input_data_parser.py
index ffd4910..9e61c09 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2022 Cisco and/or its affiliates.
+# Copyright (c) 2023 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
@@ -89,10 +89,10 @@ class ExecutionChecker(ResultVisitor):
     REGEX_VSAP_MSG_INFO = re.compile(
         r'Transfer Rate: (\d*.\d*).*\n'
         r'Latency: (\d*.\d*).*\n'
-        r'Completed requests: (\d*).*\n'
-        r'Failed requests: (\d*).*\n'
+        r'Connection [c|r]ps rate: (\d*).*\n'
         r'Total data transferred: (\d*).*\n'
-        r'Connection [cr]ps rate:\s*(\d*.\d*)'
+        r'Completed requests: (\d*).*\n'
+        r'Failed requests:\s*(\d*.\d*)'
     )
 
     # Needed for CPS and PPS tests
@@ -822,19 +822,18 @@ class ExecutionChecker(ResultVisitor):
             try:
                 result["transfer-rate"] = float(groups.group(1)) * 1e3
                 result["latency"] = float(groups.group(2))
-                result["completed-requests"] = int(groups.group(3))
-                result["failed-requests"] = int(groups.group(4))
-                result["bytes-transferred"] = int(groups.group(5))
-                if "TCP_CPS"in tags:
-                    result["cps"] = float(groups.group(6))
+                result["completed-requests"] = int(groups.group(5))
+                result["failed-requests"] = int(groups.group(6))
+                result["bytes-transferred"] = int(groups.group(4))
+                if "TCP_CPS" in tags:
+                    result["cps"] = float(groups.group(3))
                 elif "TCP_RPS" in tags:
-                    result["rps"] = float(groups.group(6))
+                    result["rps"] = float(groups.group(3))
                 else:
                     return result, status
                 status = "PASS"
-            except (IndexError, ValueError):
-                pass
-
+            except (IndexError, ValueError) as err:
+                logging.warning(err)
         return result, status
 
     def visit_suite(self, suite):