Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port profiler submodule of moveit_core #9

Merged
merged 6 commits into from
Mar 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions moveit_core/profiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ set(MOVEIT_LIB_NAME moveit_profiler)
add_library(${MOVEIT_LIB_NAME} src/profiler.cpp)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")

target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${urdfdom_LIBRARIES} ${urdfdom_headers_LIBRARIES} ${Boost_LIBRARIES})
target_link_libraries(${MOVEIT_LIB_NAME} ${rclcpp_LIBRARIES} ${rmw_implementation_LIBRARIES} ${urdfdom_LIBRARIES} ${urdfdom_headers_LIBRARIES} ${Boost_LIBRARIES})

install(TARGETS ${MOVEIT_LIB_NAME}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
install(DIRECTORY include/ DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION})
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(DIRECTORY include/ DESTINATION include)
9 changes: 5 additions & 4 deletions moveit_core/profiler/include/moveit/profiler/profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include <boost/thread.hpp>
#include <boost/noncopyable.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <rcutils/logging_macros.h>

namespace moveit
{
Expand Down Expand Up @@ -311,8 +312,8 @@ class Profiler : private boost::noncopyable
bool running_;
bool printOnDestroy_;
};
}
}
} // namespace tools
} // namespace moveit

#else

Expand Down Expand Up @@ -444,8 +445,8 @@ class Profiler
return false;
}
};
}
}
} // namespace tools
} // namespace moveit

#endif

Expand Down
7 changes: 3 additions & 4 deletions moveit_core/profiler/src/profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "moveit/profiler/profiler.h"
#if MOVEIT_ENABLE_PROFILING

#include <ros/console.h>
#include <vector>
#include <algorithm>
#include <sstream>
Expand Down Expand Up @@ -121,7 +120,7 @@ inline double to_seconds(const boost::posix_time::time_duration& d)
{
return (double)d.total_microseconds() / 1000000.0;
}
}
} // namespace

void Profiler::status(std::ostream& out, bool merge)
{
Expand Down Expand Up @@ -175,7 +174,7 @@ void Profiler::console()
std::stringstream ss;
ss << std::endl;
status(ss, true);
ROS_INFO_STREAM_NAMED("profiler", ss.str());
RCUTILS_LOG_INFO("profiler", ss.str().c_str());
}

/// @cond IGNORE
Expand Down Expand Up @@ -208,7 +207,7 @@ struct SortDoubleByValue
return a.value_ > b.value_;
}
};
}
} // namespace
/// @endcond

void Profiler::printThreadInfo(std::ostream& out, const PerThread& data)
Expand Down