From cafe87cccdfa50b7290e0a7712c44e9100822602 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Thu, 27 Feb 2025 11:36:39 +0100 Subject: [PATCH] Add benchmark for full simulation step --- tests/test_benchmark.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_benchmark.py b/tests/test_benchmark.py index 747eab2d3..bcac88151 100644 --- a/tests/test_benchmark.py +++ b/tests/test_benchmark.py @@ -132,3 +132,15 @@ def test_relaxed_rigid_contact_model( model.contact_model = jaxsim.rbda.contacts.RelaxedRigidContacts() benchmark_test_function(js.ode.system_dynamics, model, benchmark, batch_size) + + +@pytest.mark.benchmark +def test_simulation_step( + jaxsim_model_ergocub_reduced: js.model.JaxSimModel, benchmark, batch_size +): + model = jaxsim_model_ergocub_reduced + + with model.editable(validate=False) as model: + model.contact_model = jaxsim.rbda.contacts.RelaxedRigidContacts() + + benchmark_test_function(js.model.step, model, benchmark, batch_size)