diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 442601b..05251ef 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,10 +7,12 @@ on: - main pull_request: -# Pin: 0.939.0, the latest release, and aeb v0.347, the one ae3d builds -# beside. 0.939.0 is a tracking bump again, no source change (it removes -# std.http.client's process-wide pool; nothing here makes HTTP requests); -# 0.938.0 was a tracking bump (aether#3821's discarded +# Pin: 0.940.0, the latest release, and aeb v0.347, the one ae3d builds +# beside. 0.940.0 brings lane min/max as minps/maxps (aether#3815) and +# --param relation-block-limit=0 on every GCC compile (aether#3848), +# neither changing a bit of ours. 0.939.0 was a tracking bump, no source +# change (it removes std.http.client's process-wide pool; nothing here +# makes HTTP requests); 0.938.0 was a tracking bump (aether#3821's discarded # slice-returning calls clean under clang -Wunused-value, #3818's # correctly rounded float parsing on mingw-w64). 0.937.0 brought returned views tracked by their mark # (aether#3787) and the GCC inlining budget on optimising builds @@ -27,7 +29,7 @@ on: # bootstrap version: the floor this code needs, verified by every job # below. env: - AE_PIN: 0.939.0 + AE_PIN: 0.940.0 AEB_REF: v0.347 jobs: diff --git a/bench/physics_world_box3d.c b/bench/physics_world_box3d.c index 5ab3ba3..87dc144 100644 --- a/bench/physics_world_box3d.c +++ b/bench/physics_world_box3d.c @@ -12,6 +12,7 @@ #include #include +#include #include static double now_ms( void ) @@ -103,8 +104,27 @@ static void print_profile( const char* name, stage_sum sum, int steps ) sum.integratePositions / n, sum.relax / n, sum.restitution / n, sum.store / n, sum.transforms / n, sum.refit / n, sum.other / n ); } +// AEPHYSICS_BENCH_SCENE=pyramid|pyramids|grid runs that scene alone, as +// bench/physics_world.ae reads it, so a profile samples one scene. +static int wanted( const char* name ) +{ + const char* asked = getenv( "AEPHYSICS_BENCH_SCENE" ); + if ( asked == NULL || asked[0] == 0 ) + { + return 1; + } + const char* key = strcmp( name, "large pyramid" ) == 0 ? "pyramid" : strcmp( name, "many pyramids" ) == 0 ? "pyramids" : "grid"; + return strcmp( asked, key ) == 0; +} + static void run( const char* name, b3WorldId worldId, int steps ) { + if ( wanted( name ) == 0 ) + { + b3DestroyWorld( worldId ); + g_idCount = 0; + return; + } // Gather the body ids through the move events after one zero step would miss sleeping ones; walk our own list instead. stage_sum sum = { 0 }; double t0 = now_ms();