Skip to content

Commit

Permalink
fix: to plot "exe_time_ms" of ndt_scan_matcher (#161)
Browse files Browse the repository at this point in the history
* Fixed to plot "exe_time_ms" of ndt_scan_matcher

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
SakodaShintaro and pre-commit-ci[bot] authored Nov 25, 2024
1 parent 8649b37 commit 4d6c4c3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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":
Expand 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:
Expand Down

0 comments on commit 4d6c4c3

Please sign in to comment.