Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

sapier
Copy link
Contributor

@sapier sapier commented Aug 13, 2014

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

@@ -13,6 +13,18 @@ function core.register_chatcommand(cmd, def)
core.chatcommands[cmd] = def
end

if (core.is_yes(core.setting_get("tracing"))) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the additonal ( and )

@sapier
Copy link
Contributor Author

sapier commented Aug 14, 2014

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.

@sfan5
Copy link
Member

sfan5 commented Aug 14, 2014

This doesn't solve the problem, not high priority.

@sapier
Copy link
Contributor Author

sapier commented Aug 14, 2014

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. ;-)
I'm removing the flag completely as it's obviously doubtfull how to rank it

@sapier sapier changed the title Mod tracing support Mod profiling support Aug 14, 2014
local tracefct = profiling_print_log
profiling_print_log = nil
core.register_chatcommand("save_mod_profile",
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

@sapier sapier force-pushed the luamod_tracing branch 6 times, most recently from 6462a2e to bba7b92 Compare August 19, 2014 19:58
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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tracing -> profiling

@sapier
Copy link
Contributor Author

sapier commented Aug 19, 2014

merged 0c94f2fb64ff54edca790a7106ec43bbfb884058

@sapier sapier closed this Aug 19, 2014
@sapier sapier deleted the luamod_tracing branch January 10, 2015 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants