perf: harden runtime for weaker hardware
This commit is contained in:
@@ -51,11 +51,23 @@ func _test_exact_bounded_discovery(benchmark: RefCounted, fixture: Dictionary) -
|
||||
"Ordinary local queries should inspect a bounded subset of 180 loaded resources",
|
||||
)
|
||||
var adapter: ActiveWorldAdapter = fixture["adapter"]
|
||||
var manager: Node = fixture["manager"]
|
||||
var stats := adapter.get_resource_index_stats()
|
||||
_check(
|
||||
int(stats["candidate_count"]) == 180 and int(stats["occupied_cell_count"]) > 1,
|
||||
"The adapter should index every loaded anchor across multiple horizontal cells",
|
||||
)
|
||||
var player_origin := ResourceNode.get_by_id(&"benchmark_resource_0001").global_position
|
||||
var player_target: ResourceNode = manager.find_resource_node_for_player(player_origin, 12.0)
|
||||
var player_query: Dictionary = manager.last_player_resource_query_stats
|
||||
_check(player_target != null, "Player discovery should find a nearby usable resource")
|
||||
_check(
|
||||
(
|
||||
StringName(player_query.get("mode", "")) == &"spatial"
|
||||
and int(player_query.get("candidate_count", 180)) < 12
|
||||
),
|
||||
"Player discovery should inspect a bounded spatial subset, not all 180 loaded resources",
|
||||
)
|
||||
|
||||
|
||||
func _test_far_priority_is_not_pruned(benchmark: RefCounted, fixture: Dictionary) -> void:
|
||||
|
||||
Reference in New Issue
Block a user