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

Setup profiler #52

Merged
merged 3 commits into from
Jun 7, 2022
Merged

Setup profiler #52

merged 3 commits into from
Jun 7, 2022

Conversation

chapulina
Copy link
Contributor

Ignition Common's profiler is very handy to debug performance.

This PR just sets up the profiler and makes use of the existing profiling points.

See the snippet added to the README for how to enable and use it. In order to get profiling points coming from the Gazebo libraries themselves, they need to be compiled from source with -DENABLE_PROFILER=1.

Here's some example output. I was surprised to see that the PolytropicPneumaticSpring is taking up almost as much time as the physics' forward step.

buoy_profiler

Signed-off-by: Louise Poubel <[email protected]>
@hamilton8415
Copy link
Collaborator

This is great, glad to see such a tool exists. I was surprised that the ElectroHydraulicPTO plugin didn't win the award. I know for sure there's some optimizations in there still to chase.

@andermi
Copy link
Collaborator

andermi commented Jun 2, 2022

the PolytropicPneumaticSpring is taking up almost as much time as the physics' forward step

Most likely my debug console printouts. I can remove most of them now.

@andermi
Copy link
Collaborator

andermi commented Jun 3, 2022

@chapulina when I try this, I don't see SimulationRunner in the Remotery window

Screenshot from 2022-06-02 17-03-23

@chapulina
Copy link
Contributor Author

when I try this, I don't see SimulationRunner in the Remotery window

Did you compile all of Ignition Fortress from source with -DENABLE_PROFILER=1? If you haven't, you'll only see the profiling points from buoy_gazebo.

Other tips to navigate the UI may also help here. Use the scroll wheel to zoom in a bit more time-wise, and click on the + button a few times next to Thread0 to see more lines. The Pause button on the top-right also helps.

@andermi
Copy link
Collaborator

andermi commented Jun 6, 2022

Did you compile all of Ignition Fortress from source

Ah, that's the issue. Thanks!

Signed-off-by: Louise Poubel <[email protected]>
@andermi
Copy link
Collaborator

andermi commented Jun 7, 2022

There, I fixed it! 🥇

Screenshot from 2022-06-06 18-19-53

Copy link
Collaborator

@andermi andermi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

It also might be worth mentioning that I had to run:
colcon build --cmake-args ' -DBUILD_TESTING=true' ' -DENABLE_PROFILER=0'
in my workspace to get colcon test to work again (even on other branches... since it's in the cmake in build folder in top level workspace)

@chapulina
Copy link
Contributor Author

It also might be worth mentioning that I had to run:

Ahh good call, it took me a while to figure that out the first time I needed it, it's definitely worth mentioning.

@chapulina chapulina enabled auto-merge (squash) June 7, 2022 02:15
@chapulina chapulina merged commit 70eed6d into main Jun 7, 2022
@chapulina chapulina deleted the chapulina/profiler branch June 7, 2022 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants