Skip to content

Commit 2760e37

Browse files
committed
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 <[email protected]> Signed-off-by: Babis Chalios <[email protected]>
1 parent 2dab5e8 commit 2760e37

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/host_tools/fcmetrics.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,10 @@ def flatten_dict(node, prefix: str):
479479
failure_metrics = {
480480
key: value
481481
for key, value in flattened_metrics.items()
482-
if "err" in key or "fail" in key or "panic" in key or "num_faults" in key
482+
if "err" in key.split(".")[-1]
483+
or "fail" in key.split(".")[-1]
484+
or "panic" in key.split(".")[-1]
485+
or "num_faults" in key.split(".")[-1]
483486
if value
484487
if key not in ignored_failure_metrics
485488
}

0 commit comments

Comments
 (0)