Skip to content

This ROS node is dedicated to profiling the execution time of functions, offering detailed insights through profiling and timing decorators.

License

Notifications You must be signed in to change notification settings

zhuxuanya/ros-time-profiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ros-time-profiler

This ROS node is dedicated to profiling the execution time of functions, offering detailed insights through profiling and timing decorators. It helps in evaluating the performance of specific functions under real-time conditions.

Installation

Navigate to the src directory of the catkin workspace (e.g., ~/catkin_ws):

cd ~/catkin_ws/src

Clone the repository into the src directory and rename it to time_profiler:

git clone https://github.com/zhuxuanya/ros-time-profiler.git time_profiler

Return to the catkin workspace root and rebuild:

cd ..
catkin_make

Source the environment to update the workspace:

source devel/setup.bash

Usage

Before using the decorators, make sure the debug parameter in launch file is set to True to enable detailed profiling and timing logs. Apply the decorator to the function as follows:

  • Profiling:
from time_profiler.profiler import *

@profiling_decorator
def function():
    # code
  • Timing:
from time_profiler.profiler import *

@timing_decorator
def function():
    # code

Run ROS node as usual, and observe the logs for detailed execution metrics.

About

This ROS node is dedicated to profiling the execution time of functions, offering detailed insights through profiling and timing decorators.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published