From 467a63d2032514bdf5143aa93631c1b0c9eba6c5 Mon Sep 17 00:00:00 2001 From: Kyle Bayes Date: Thu, 20 Mar 2025 05:15:18 -0700 Subject: [PATCH] Add BoxBox to ccd benchmarks. PiperOrigin-RevId: 738761460 Change-Id: If59d306748d64e9e30abe65daa746a4f8e9ec78c --- test/benchmark/ccd_benchmark_test.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/benchmark/ccd_benchmark_test.cc b/test/benchmark/ccd_benchmark_test.cc index f9da456b..1ea8ce37 100644 --- a/test/benchmark/ccd_benchmark_test.cc +++ b/test/benchmark/ccd_benchmark_test.cc @@ -35,6 +35,8 @@ static const int kBatchSize = 50; static const char kBoxMeshPath[] = "../test/engine/testdata/collision_convex/perf/boxmesh.xml"; +static const char kBoxBoxPath[] = + "../test/engine/testdata/collision_convex/perf/box.xml"; static const char kEllipsoidPath[] = "../test/engine/testdata/collision_convex/perf/ellipsoid.xml"; static const char kMixedPath[] = @@ -113,6 +115,12 @@ void ABSL_ATTRIBUTE_NO_TAIL_CALL } BENCHMARK(BM_BoxMesh_LibCCD); +void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_BoxBox(benchmark::State& state) { + static TestHarness harness(kBoxBoxPath, "box.xml (BoxBox)"); + harness.RunBenchmark(state); +} +BENCHMARK(BM_BoxBox); + void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_Ellipsoid_NativeCCD(benchmark::State& state) { static TestHarness harness(kEllipsoidPath, "ellipsoid.xml (nativeccd)");