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

Profiling support #743

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Vrixyz
Copy link
Contributor

@Vrixyz Vrixyz commented Sep 27, 2024

This PR uses https://crates.io/crates/profiling so we can choose any supported profiling options. This is also helpful for users to get an understanding of performances.

using tracy on all_examples3 (cargo run --bin all_examples3 --features profiling/profile-with-tracy)

Screenshot from 2024-09-27 12-01-10

Should we remove counters from rapier ? I imagine it would be great to be able to output the same kind of csv we're doing currently, but using this profiling option.

@@ -1,5 +1,6 @@
{
"rust-analyzer.cargo.features": [
"simd-stable"
"simd-stable",
"dim3"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is not needed, but not an entirely bad thing 🤔 ; should we ignore this file in gitignore though ?

@@ -21,6 +27,7 @@ anyhow = "1"
bitflags = "2"
# NOTE: we are not using the (more recent) urdf-rs crate because of https://github.com/openrr/urdf-rs/issues/94
xurdf = "0.2"
profiling = "1.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the profiling dependency there but I think I didn´t mark any functions

@@ -1552,6 +1552,7 @@ fn update_testbed(
if state.running == RunMode::Step {
state.running = RunMode::Stop;
}
profiling::finish_frame!();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

profiling::finish_frame!(); belongs here (in user code), as rapier isn't strictly the owner of the loop.

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.

1 participant