Fix: when collected telemetry data are broken 58/37658/2
authorViliam Luc <vluc@cisco.com>
Mon, 14 Nov 2022 11:56:50 +0000 (12:56 +0100)
committerTibor Frank <tifrank@cisco.com>
Mon, 21 Nov 2022 08:26:00 +0000 (08:26 +0000)
Signed-off-by: Viliam Luc <vluc@cisco.com>
Change-Id: Ibf9cf8d56fcddd3d83f25294dffaac7449bf3088

resources/tools/telemetry/bundle_perf_stat.py

index f76149f..17afbe0 100644 (file)
@@ -68,14 +68,14 @@ class BundlePerfStat:
 
         if text == u"":
             getLogger("console_stdout").info(event[u"eventcode"])
-        elif text.count(u";") < 6:
-            getLogger("console_stdout").info(
-                f"Could not get counters for event "\
-                f"{event[u'eventcode']}. "\
-                f"Is it supported by CPU?"
-            )
         else:
             for line in text.splitlines():
+                if line.count(u";") < 6:
+                    getLogger("console_stdout").info(
+                        f"Could not get counters for current thread."
+                        f"{line}"
+                    )
+                    continue
                 item = dict()
                 labels = dict()
                 item[u"name"] = self.metrics['counter'][0]['name']