From 4d6c4c3efda395c4771299d8af61a2b0175d2c78 Mon Sep 17 00:00:00 2001 From: SakodaShintaro Date: Mon, 25 Nov 2024 09:19:33 +0900 Subject: [PATCH] fix: to plot "exe_time_ms" of ndt_scan_matcher (#161) * Fixed to plot "exe_time_ms" of ndt_scan_matcher Signed-off-by: Shintaro Sakoda * style(pre-commit): autofix --------- Signed-off-by: Shintaro Sakoda Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .../system_performance_plotter/processing_time_plotter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/autoware_debug_tools/autoware_debug_tools/system_performance_plotter/processing_time_plotter.py b/common/autoware_debug_tools/autoware_debug_tools/system_performance_plotter/processing_time_plotter.py index c865deff..68a4d151 100644 --- a/common/autoware_debug_tools/autoware_debug_tools/system_performance_plotter/processing_time_plotter.py +++ b/common/autoware_debug_tools/autoware_debug_tools/system_performance_plotter/processing_time_plotter.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +from tier4_debug_msgs.msg import Float32Stamped from tier4_debug_msgs.msg import Float64Stamped from .system_performance_plotter_base import PREDEFINED_COMPONENT_NAMES @@ -11,7 +12,7 @@ class ProcessingTimePlotter(SystemPerformancePlotterBase): def check_topic(self, topic_name): if self.grep_topic_name is not None and self.grep_topic_name not in topic_name: return False - if "/processing_time_ms" not in topic_name: + if "/processing_time_ms" not in topic_name and "/exe_time_ms" not in topic_name: return False if self.component_name == "all": @@ -29,7 +30,7 @@ def check_topic(self, topic_name): return True def update_metrics_func(self, topic_name, data, date_time): - if not isinstance(data, Float64Stamped): + if not isinstance(data, Float64Stamped) and not isinstance(data, Float32Stamped): return if topic_name not in self.stamp_and_metrics: