From 2760e37bcc9a80b673a1eca297a7112468afdac3 Mon Sep 17 00:00:00 2001 From: Babis Chalios Date: Fri, 3 Oct 2025 16:33:36 +0200 Subject: [PATCH] fix(tests): do not look into full path for error metric In order to collect all error metrics we're checking for "err" in the key name, which causes performance tests to fail because we added metrics called "intERRupts". Change the check to only look at the leaf of the path, so that when we have a metric such as `fc_metrics.net_metrics.cfg_fails`, we'll only be looking into `cfg_fails`. Suggested-by: Riccardo Mancini Signed-off-by: Babis Chalios --- tests/host_tools/fcmetrics.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/host_tools/fcmetrics.py b/tests/host_tools/fcmetrics.py index 864481b68e2..f340aa4aaf3 100644 --- a/tests/host_tools/fcmetrics.py +++ b/tests/host_tools/fcmetrics.py @@ -479,7 +479,10 @@ def flatten_dict(node, prefix: str): failure_metrics = { key: value for key, value in flattened_metrics.items() - if "err" in key or "fail" in key or "panic" in key or "num_faults" in key + if "err" in key.split(".")[-1] + or "fail" in key.split(".")[-1] + or "panic" in key.split(".")[-1] + or "num_faults" in key.split(".")[-1] if value if key not in ignored_failure_metrics }