aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Berger <contact@thierryberger.com>2024-11-19 16:33:26 +0100
committerGitHub <noreply@github.com>2024-11-19 16:33:26 +0100
commit510237cc29ebc667a8c158ef0340b7d1aa669a72 (patch)
tree772daf3fac2e463eba254900001fce5a659f2f92
parentff79f4c67478f8c8045464cac22f9e57388cd4a0 (diff)
downloadrapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.tar.gz
rapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.tar.bz2
rapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.zip
Profiling support (#743)
-rw-r--r--.gitignore3
-rw-r--r--.vscode/launch.json326
-rw-r--r--.vscode/settings.json5
-rw-r--r--.vscode/tasks.json288
-rw-r--r--CHANGELOG.md2
-rw-r--r--Cargo.toml6
-rw-r--r--crates/rapier2d-f64/Cargo.toml1
-rw-r--r--crates/rapier2d/Cargo.toml1
-rw-r--r--crates/rapier3d-f64/Cargo.toml1
-rw-r--r--crates/rapier3d-meshloader/Cargo.toml1
-rw-r--r--crates/rapier3d/Cargo.toml1
-rw-r--r--crates/rapier_testbed2d-f64/Cargo.toml10
-rw-r--r--crates/rapier_testbed2d/Cargo.toml8
-rw-r--r--crates/rapier_testbed3d-f64/Cargo.toml10
-rw-r--r--crates/rapier_testbed3d/Cargo.toml8
-rw-r--r--examples2d/Cargo.toml1
-rw-r--r--examples3d-f64/all_examples3-f64.rs1
-rw-r--r--examples3d/Cargo.toml2
-rw-r--r--src/control/character_controller.rs5
-rw-r--r--src/control/ray_cast_vehicle_controller.rs3
-rw-r--r--src/dynamics/ccd/ccd_solver.rs2
-rw-r--r--src/dynamics/ccd/toi_entry.rs1
-rw-r--r--src/dynamics/joint/impulse_joint/impulse_joint_set.rs3
-rw-r--r--src/dynamics/joint/multibody_joint/multibody.rs2
-rw-r--r--src/dynamics/joint/multibody_joint/multibody_ik.rs2
-rw-r--r--src/dynamics/joint/multibody_joint/multibody_joint.rs1
-rw-r--r--src/dynamics/joint/multibody_joint/multibody_joint_set.rs6
-rw-r--r--src/dynamics/rigid_body.rs3
-rw-r--r--src/dynamics/rigid_body_components.rs1
-rw-r--r--src/dynamics/rigid_body_set.rs1
-rw-r--r--src/dynamics/solver/contact_constraint/contact_constraints_set.rs4
-rw-r--r--src/dynamics/solver/contact_constraint/generic_one_body_constraint.rs1
-rw-r--r--src/dynamics/solver/interaction_groups.rs1
-rw-r--r--src/dynamics/solver/island_solver.rs1
-rw-r--r--src/dynamics/solver/joint_constraint/joint_constraints_set.rs2
-rw-r--r--src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs1
-rw-r--r--src/dynamics/solver/parallel_island_solver.rs1
-rw-r--r--src/dynamics/solver/velocity_solver.rs2
-rw-r--r--src/geometry/broad_phase_multi_sap/broad_phase_multi_sap.rs5
-rw-r--r--src/geometry/broad_phase_multi_sap/sap_axis.rs1
-rw-r--r--src/geometry/broad_phase_multi_sap/sap_layer.rs4
-rw-r--r--src/geometry/broad_phase_multi_sap/sap_region.rs1
-rw-r--r--src/geometry/contact_pair.rs1
-rw-r--r--src/geometry/interaction_graph.rs2
-rw-r--r--src/geometry/mesh_converter.rs1
-rw-r--r--src/geometry/narrow_phase.rs7
-rw-r--r--src/pipeline/debug_render_pipeline/debug_render_pipeline.rs7
-rw-r--r--src/pipeline/query_pipeline/mod.rs13
-rw-r--r--src_testbed/box2d_backend.rs3
-rw-r--r--src_testbed/graphics.rs2
-rw-r--r--src_testbed/harness/mod.rs1
-rw-r--r--src_testbed/objects/node.rs4
-rw-r--r--src_testbed/physics/mod.rs1
-rw-r--r--src_testbed/physx_backend.rs1
-rw-r--r--src_testbed/testbed.rs13
-rw-r--r--src_testbed/ui.rs35
56 files changed, 185 insertions, 635 deletions
diff --git a/.gitignore b/.gitignore
index db22dde..27351d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,5 @@ target
.DS_Store
package-lock.json
**/*.csv
-.history \ No newline at end of file
+.history
+.vscode/ \ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index 3f328c5..0000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,326 +0,0 @@
-{
- // Use IntelliSense to learn about possible attributes.
- // Hover to view descriptions of existing attributes.
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug unit tests in library 'rapier2d'",
- "cargo": {
- "args": [
- "test",
- "--no-run",
- "--lib",
- "--package=rapier2d"
- ],
- "filter": {
- "name": "rapier2d",
- "kind": "lib"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug unit tests in library 'rapier2d_f64'",
- "cargo": {
- "args": [
- "test",
- "--no-run",
- "--lib",
- "--package=rapier2d-f64"
- ],
- "filter": {
- "name": "rapier2d_f64",
- "kind": "lib"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug unit tests in library 'rapier_testbed2d'",
- "cargo": {
- "args": [
- "test",
- "--no-run",
- "--lib",
- "--package=rapier_testbed2d"
- ],
- "filter": {
- "name": "rapier_testbed2d",
- "kind": "lib"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug executable 'all_examples2'",
- "cargo": {
- "args": [
- "build",
- "--bin=all_examples2",
- "--package=rapier-examples-2d"
- ],
- "filter": {
- "name": "all_examples2",
- "kind": "bin"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug unit tests in executable 'all_examples2'",
- "cargo": {
- "args": [
- "test",
- "--no-run",
- "--bin=all_examples2",
- "--package=rapier-examples-2d"
- ],
- "filter": {
- "name": "all_examples2",
- "kind": "bin"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug executable 'all_benchmarks2'",
- "cargo": {
- "args": [
- "build",
- "--bin=all_benchmarks2",
- "--package=rapier-benchmarks-2d"
- ],
- "filter": {
- "name": "all_benchmarks2",
- "kind": "bin"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug unit tests in executable 'all_benchmarks2'",
- "cargo": {
- "args": [
- "test",
- "--no-run",
- "--bin=all_benchmarks2",
- "--package=rapier-benchmarks-2d"
- ],
- "filter": {
- "name": "all_benchmarks2",
- "kind": "bin"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug unit tests in library 'rapier3d'",
- "cargo": {
- "args": [
- "test",
- "--no-run",
- "--lib",
- "--package=rapier3d"
- ],
- "filter": {
- "name": "rapier3d",
- "kind": "lib"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug unit tests in library 'rapier3d_f64'",
- "cargo": {
- "args": [
- "test",
- "--no-run",
- "--lib",
- "--package=rapier3d-f64"
- ],
- "filter": {
- "name": "rapier3d_f64",
- "kind": "lib"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug unit tests in library 'rapier_testbed3d'",
- "cargo": {
- "args": [
- "test",
- "--no-run",
- "--lib",
- "--package=rapier_testbed3d"
- ],
- "filter": {
- "name": "rapier_testbed3d",
- "kind": "lib"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug executable 'all_examples3'",
- "cargo": {
- "args": [
- "build",
- "--bin=all_examples3",
- "--package=rapier-examples-3d"
- ],
- "filter": {
- "name": "all_examples3",
- "kind": "bin"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug unit tests in executable 'all_examples3'",
- "cargo": {
- "args": [
- "test",
- "--no-run",
- "--bin=all_examples3",
- "--package=rapier-examples-3d"
- ],
- "filter": {
- "name": "all_examples3",
- "kind": "bin"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Run 'all_examples3'",
- "cargo": {
- "args": [
- "run",
- "--release",
- "--bin=all_examples3",
- "--package=rapier-examples-3d"
- ],
- "filter": {
- "name": "all_examples3",
- "kind": "bin"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug executable 'harness_capsules3'",
- "cargo": {
- "args": [
- "build",
- "--bin=harness_capsules3",
- "--package=rapier-examples-3d"
- ],
- "filter": {
- "name": "harness_capsules3",
- "kind": "bin"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug unit tests in executable 'harness_capsules3'",
- "cargo": {
- "args": [
- "test",
- "--no-run",
- "--bin=harness_capsules3",
- "--package=rapier-examples-3d"
- ],
- "filter": {
- "name": "harness_capsules3",
- "kind": "bin"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug executable 'all_benchmarks3'",
- "cargo": {
- "args": [
- "build",
- "--bin=all_benchmarks3",
- "--package=rapier-benchmarks-3d"
- ],
- "filter": {
- "name": "all_benchmarks3",
- "kind": "bin"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- },
- {
- "type": "lldb",
- "request": "launch",
- "name": "Debug unit tests in executable 'all_benchmarks3'",
- "cargo": {
- "args": [
- "test",
- "--no-run",
- "--bin=all_benchmarks3",
- "--package=rapier-benchmarks-3d"
- ],
- "filter": {
- "name": "all_benchmarks3",
- "kind": "bin"
- }
- },
- "args": [],
- "cwd": "${workspaceFolder}"
- }
- ]
-} \ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index e932736..0000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "rust-analyzer.cargo.features": [
- "simd-stable"
- ]
-} \ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
deleted file mode 100644
index d103f97..0000000
--- a/.vscode/tasks.json
+++ /dev/null
@@ -1,288 +0,0 @@
-{
- // See https://go.microsoft.com/fwlink/?LinkId=733558
- // for the documentation about the tasks.json format
- "version": "2.0.0",
- "options": {
- "env": {
- "RUST_BACKTRACE": "1"
- }
- },
- "tasks": [
- {
- "label": "🚀 run 3d",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_examples3",
- "--release",
- "--features",
- "other-backends",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "🚀 run 3d − 💌 deterministic",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_examples3",
- "--release",
- "--features",
- "enhanced-determinism",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "🚀 run 3d − 🌈 simd",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_examples3",
- "--release",
- "--features",
- "simd-stable,other-backends",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "🚀 run 3d − 🌈 simd 🪢 parallel",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_examples3",
- "--release",
- "--features",
- "simd-stable,other-backends,parallel",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "🚀 run 2d",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_examples2",
- "--release",
- "--features",
- "other-backends",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "🚀 run 2d − 🌈 simd",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_examples2",
- "--release",
- "--features",
- "simd-stable,other-backends",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "🚀 run 2d − 🌈 simd 🪢 parallel",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_examples2",
- "--release",
- "--features",
- "simd-stable,other-backends,parallel",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "⏱ bench 3d",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_benchmarks3",
- "--release",
- "--features",
- "other-backends",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "⏱ bench 3d − 🌈 simd",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_benchmarks3",
- "--release",
- "--features",
- "simd-stable,other-backends",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "⏱ bench 3d − 🌈 simd 🪢 parallel",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_benchmarks3",
- "--release",
- "--features",
- "simd-stable,other-backends,parallel",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "⏱ bench 2d",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_benchmarks2",
- "--release",
- "--features",
- "other-backends",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "⏱ bench 2d − 🌈 simd",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_benchmarks2",
- "--release",
- "--features",
- "simd-stable,other-backends",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "⏱ bench 2d − 🌈 simd 🪢 parallel",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_benchmarks2",
- "--release",
- "--features",
- "simd-stable,other-backends,parallel",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "🪲 debug 3d",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_examples3",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "🪲 debug 3d − 🌈 simd",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_examples3",
- "--features",
- "simd-stable",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "🪲 debug 3d − 🌈 simd 🪢 parallel",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_examples3",
- "--features",
- "simd-stable,parallel",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "🪲 debug 3d − 💌 deterministic",
- "type": "shell",
- "command": "cargo",
- "args": [
- "run",
- "--bin",
- "all_examples3",
- "--features",
- "enhanced-determinism",
- "--",
- "--pause"
- ],
- "group": "build"
- },
- {
- "label": "🛠 tests",
- "type": "shell",
- "command": "cargo",
- "args": [
- "test"
- ],
- "group": "build"
- },
- ]
-]
-} \ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f377c98..248e402 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,8 @@
### Added
- `RigidBodySet` and `ColliderSet` have a new constructor `with_capacity`.
+- Use `profiling` crate to provide helpful profiling information in different tools.
+ - The testbeds have been updated to use `puffin_egui`
### Modified
diff --git a/Cargo.toml b/Cargo.toml
index 8d9b1b9..e8824ce 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,6 +38,12