1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Builtin profiler: Capture Tracy zones; And small improvements (#16479)

* Feature: Use the builtin profiler to automatically make zones for mod callback functions.
* Doc: Basic doc for builtin profiler, and better `/profiler` chatcommand help.
* Fix: `register_functions` (table of callback register function names), and `entity_instrumentation` is no longer outdated.
* Fix: Builtin profiler output is no longer printed to debug.txt or to file in world with translation escapes.
* Fix: Entity callback name generation used `obj_def.label` (normally non-existing field), now it uses the entity name.
* Small code improvements, like use of new `Settings.get_bool` with default.
This commit is contained in:
DS 2025-09-08 18:27:26 +02:00 committed by GitHub
parent c9d4c33174
commit 69497200f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 171 additions and 92 deletions

View file

@ -584,6 +584,7 @@ core.unregister_biome = make_wrap_deregistration(core.register_biome,
local make_registration = builtin_shared.make_registration
local make_registration_reverse = builtin_shared.make_registration_reverse
-- keep in sync with profiler/instrumentation.lua
core.registered_on_chat_messages, core.register_on_chat_message = make_registration()
core.registered_on_chatcommands, core.register_on_chatcommand = make_registration()
core.registered_globalsteps, core.register_globalstep = make_registration()