18 lines
1.5 KiB
GDScript
18 lines
1.5 KiB
GDScript
extends "res://tests/s6/test_performance_budget.gd"
|
|
const Guard := preload("/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p23-02-native-cache-public-mutations-r144/profile_guard.gd")
|
|
func _initialize() -> void:
|
|
if not Guard.activate(): quit(97); return
|
|
var loaded := GDExtensionManager.load_extension("/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p23-02-native-hot-loop-local-r329/candidate.gdextension")
|
|
if loaded != GDExtensionManager.LOAD_STATUS_OK or not ClassDB.class_exists(&"TheTreeNumericCore"): quit(96); return
|
|
var probe: Variant = ClassDB.instantiate(&"TheTreeNumericCore")
|
|
if probe == null or not probe.has_method(&"performance_record_sample") or not probe.has_method(&"guest_tree_edge_rows"): quit(96); return
|
|
probe = null
|
|
if FileAccess.get_sha256("res://scripts/core/performance_budget.gd") != OS.get_environment("THE_TREE_EXPECTED_BUDGET_SHA"): quit(98); return
|
|
print("NATIVE_ADAPTER_LIBRARY_REGISTERED")
|
|
super._initialize()
|
|
func _run() -> void:
|
|
super._run()
|
|
var f := FileAccess.open(OS.get_environment("THE_TREE_RUNTIME_MONITOR_OUTPUT").path_join("report.json"), FileAccess.WRITE)
|
|
if f == null: quit(98); return
|
|
f.store_string(JSON.stringify({"mode":"s6", "pid":OS.get_process_id(), "checks":_checks, "failures":_failures, "passed":_failures == 0, "original_s6_test_unchanged":true, "unit_accepted":false, "performance_accepted":false}, "\t")); f.close()
|