From 3db6ab647ee2af1cc4c3dc33e7b091dd511569fd Mon Sep 17 00:00:00 2001 From: Miryam-Schwartz <101129301+Miryam-Schwartz@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:55:28 +0200 Subject: [PATCH] apply threshold on primary telemetry only (#285) --- .../log_analyzers/ibdiagnet2_port_counters_analyzer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/ibdiagnet2_port_counters_analyzer.py b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/ibdiagnet2_port_counters_analyzer.py index a809e4a0..47b6ccc5 100644 --- a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/ibdiagnet2_port_counters_analyzer.py +++ b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/ibdiagnet2_port_counters_analyzer.py @@ -129,7 +129,8 @@ def analyze_iteration_time(self, threshold=0.15): filtered_data = filtered_data[["type", "timestamp", "data"]] filtered_data["data"] = pd.to_numeric(filtered_data["data"], errors="coerce") - filtered_data = filtered_data[filtered_data["data"] >= threshold] + if self.telemetry_type == "primary": + filtered_data = filtered_data[filtered_data["data"] >= threshold] filtered_data["timestamp"] = pd.to_datetime( filtered_data["timestamp"], errors="coerce" )