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 doesn't show up in profiler view unless it has the on_tick event registered #60

Open
stevenwdv opened this issue May 21, 2022 · 6 comments

Comments

@stevenwdv
Copy link

stevenwdv commented May 21, 2022

It seems that a mod doesn't show up in the profiler flame panel if it has not registered an 'on tick' handler, even if it has an empty function.

Compare:

Without on_tick, I don't see my mod:
without on_click

With on_tick, ah there it is!:
with on_tick

In both cases I'm selecting a number of large areas with my selection tool.

@justarandomgeek
Copy link
Owner

It doesn't report until it accumulates profileUpdateRate of hits per mod. Without the on_tick you're probably not hitting it enough. You can remote.call("profiler","dump") to make it dump everything it's got collected but not dumped yet immediately.

@stevenwdv
Copy link
Author

Hm, so is that the number of times it calls a certain function? Or is it the number of times it sampled some line in the mod? Because if it's about execution time then it should find my mod, as for a large selection it would normally take a couple of seconds (with processing code not shown here), but still does not show up.

@justarandomgeek
Copy link
Owner

the number of times it makes a top level entry into that mod's lua

@stevenwdv
Copy link
Author

Ah okay I guess that is the problem then

@stevenwdv
Copy link
Author

Would it be possible to also take the execution time of each mod into account?

@justarandomgeek
Copy link
Owner

not really, no. But you can just adjust profileUpdateRate in your launch config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants