New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mod profiling support #1557
Mod profiling support #1557
Conversation
@@ -13,6 +13,18 @@ function core.register_chatcommand(cmd, def) | |||
core.chatcommands[cmd] = def | |||
end | |||
|
|||
if (core.is_yes(core.setting_get("tracing"))) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the additonal ( and )
We've got server step spikes in minetest_game of about 1s, lots of mods suffer from bad programming. This is definitively not a low prio enhancement. |
This doesn't solve the problem, not high priority. |
If you really wanna keep ppl asleep because they have no chance to find out what they're doing wrong this is low prio for sure. As you're part of minetest_game support team please fix farming ... but don't use this pull as it's low prio and not needed to do it. ;-) |
local tracefct = profiling_print_log | ||
profiling_print_log = nil | ||
core.register_chatcommand("save_mod_profile", | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
6462a2e
to
bba7b92
Compare
Config settings: profiling = true/false (gather statistics) detailed_profiling = true/false (break mod times to callbacks) Chat commands: save_mod_profile saves current statistics in debug.txt and shows on console (on default loglevel)
|
||
-------------------------------------------------------------------------------- | ||
local function initialize_profiling() | ||
core.log("action", "Initialize tracing") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tracing -> profiling
merged 0c94f2fb64ff54edca790a7106ec43bbfb884058 |
Config settings:
profiling = true/false (gather mod statistics)
detailed_profiling = true/false (break mod times to callbacks)
Chat commands:
save_mod_profile saves current statistics in debug.txt and shows on console (on default loglevel)
Example what you're gonna see:
https://gist.github.com/sapier/4629aa2acfa1b943df97