From 6523fc28b865cfae82846a7b66bedd32018959e4 Mon Sep 17 00:00:00 2001 From: Rijad Zuzo Date: Thu, 13 Aug 2026 00:08:47 +0200 Subject: [PATCH] chore: normalize regional project files --- simulation/state/MobileGroupStateRecord.gd | 4 +--- tests/unit/test_combatant_factory.gd.uid | 1 + tools/benchmark_regional_scale.gd | 25 ++++++++++++---------- 3 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 tests/unit/test_combatant_factory.gd.uid diff --git a/simulation/state/MobileGroupStateRecord.gd b/simulation/state/MobileGroupStateRecord.gd index 6eff12a..e18023b 100644 --- a/simulation/state/MobileGroupStateRecord.gd +++ b/simulation/state/MobileGroupStateRecord.gd @@ -326,9 +326,7 @@ func get_headcount() -> int: return headcount -func with_location( - address: SpatialAddress, cause_event_id: int = -1 -) -> MobileGroupStateRecord: +func with_location(address: SpatialAddress, cause_event_id: int = -1) -> MobileGroupStateRecord: var history_event_ids := _history_with_event(cause_event_id) return create_at_location( get_group_id(), diff --git a/tests/unit/test_combatant_factory.gd.uid b/tests/unit/test_combatant_factory.gd.uid new file mode 100644 index 0000000..ae45e53 --- /dev/null +++ b/tests/unit/test_combatant_factory.gd.uid @@ -0,0 +1 @@ +uid://hjnmwlkf4fu2 diff --git a/tools/benchmark_regional_scale.gd b/tools/benchmark_regional_scale.gd index 76281e0..8f4ae7c 100644 --- a/tools/benchmark_regional_scale.gd +++ b/tools/benchmark_regional_scale.gd @@ -47,7 +47,8 @@ func _run() -> void: "default_execution_budget": DEFAULT_BUDGET, "fixture": _fixture_summary(samples[0]), "default_budget": _summarize_timings(samples), - "budget_parity": { + "budget_parity": + { "budget_one_final_checksum": budget_one["final_checksum"], "budget_one_drain_batches": budget_one["drain_batches"], "unlimited_final_checksum": unlimited["final_checksum"], @@ -65,17 +66,19 @@ func _run() -> void: output.close() print( ( - "[BENCH] regional | %d named + %d aggregate | %d caravans | " - + "%d jobs | median %.2f ms total | %.2f MiB state" + ( + "[BENCH] regional | %d named + %d aggregate | %d caravans | " + + "%d jobs | median %.2f ms total | %.2f MiB state" + ) + % [ + report["fixture"]["named_person_count"], + report["fixture"]["cohort_resident_count"], + report["fixture"]["caravan_count"], + report["fixture"]["initial_job_count"], + float(report["default_budget"]["elapsed_usec_median"]) / 1000.0, + float(report["fixture"]["regional_state_bytes"]) / (1024.0 * 1024.0), + ] ) - % [ - report["fixture"]["named_person_count"], - report["fixture"]["cohort_resident_count"], - report["fixture"]["caravan_count"], - report["fixture"]["initial_job_count"], - float(report["default_budget"]["elapsed_usec_median"]) / 1000.0, - float(report["fixture"]["regional_state_bytes"]) / (1024.0 * 1024.0), - ] ) print("[BENCH] Report: %s" % ProjectSettings.globalize_path(output_path)) quit(0)