diff --git a/.github/CODEOWNERS b/.github/_CODEOWNERS similarity index 100% rename from .github/CODEOWNERS rename to .github/_CODEOWNERS diff --git a/common/autoware_universe_utils/src/system/time_keeper.cpp b/common/autoware_universe_utils/src/system/time_keeper.cpp index 8c715c5ccd7e3..b6e82cbd2f58a 100644 --- a/common/autoware_universe_utils/src/system/time_keeper.cpp +++ b/common/autoware_universe_utils/src/system/time_keeper.cpp @@ -20,6 +20,7 @@ #include #include +#include namespace autoware::universe_utils { @@ -135,9 +136,10 @@ void TimeKeeper::start_track(const std::string & func_name) root_node_thread_id_ = std::this_thread::get_id(); } else { if (root_node_thread_id_ != std::this_thread::get_id()) { - RCLCPP_WARN( - rclcpp::get_logger("TimeKeeper"), - "TimeKeeper::start_track() is called from a different thread. Ignoring the call."); + const auto warning_msg = fmt::format( + "TimeKeeper::start_track({}) is called from a different thread. Ignoring the call.", + func_name); + RCLCPP_WARN(rclcpp::get_logger("TimeKeeper"), "%s", warning_msg.c_str()); return; } current_time_node_ = current_time_node_->add_child(func_name); diff --git a/common/autoware_universe_utils/test/src/system/test_time_keeper.cpp b/common/autoware_universe_utils/test/src/system/test_time_keeper.cpp index 0540fa8a283ad..ffefaed316b19 100644 --- a/common/autoware_universe_utils/test/src/system/test_time_keeper.cpp +++ b/common/autoware_universe_utils/test/src/system/test_time_keeper.cpp @@ -86,7 +86,11 @@ TEST_F(TimeKeeperTest, MultiThreadWarning) t.join(); std::string err = testing::internal::GetCapturedStderr(); - EXPECT_TRUE( - err.find("TimeKeeper::start_track() is called from a different thread. Ignoring the call.") != - std::string::npos); + const bool error_found = err.find( + "TimeKeeper::start_track(MainFunction) is called from a different " + "thread. Ignoring the call.") != std::string::npos || + err.find( + "TimeKeeper::start_track(ThreadFunction) is called from a different " + "thread. Ignoring the call.") != std::string::npos; + EXPECT_TRUE(error_found); }