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

Add support for defining custom perfomance monitors #229

Closed
greenfox1505 opened this issue Nov 14, 2019 · 0 comments · Fixed by godotengine/godot#39302
Closed

Add support for defining custom perfomance monitors #229

greenfox1505 opened this issue Nov 14, 2019 · 0 comments · Fixed by godotengine/godot#39302
Milestone

Comments

@greenfox1505
Copy link

greenfox1505 commented Nov 14, 2019

Describe the project you are working on:
Job Queue

Describe the problem or limitation you are having in your project:
Monitoring Performance

Describe how this feature / enhancement will help you overcome this problem or limitation:
It seems to me that Godot has a fantastic monitoring system for debugging. FPS or physics times or memory use or physics interactions, Godot has a monitor for so many of these. But only core engine features. If a Godot user wants to monitor something else, he has to create his own monitoring system (usually just a label that updates every frame or so).

Can we expose this monitoring system to the user? Allow developers to add metrics to the performance monitoring system and display those in the debugger.

For me, I would like to see how many jobs are completed in a given frame and how that is impacting or influencing the frame rate. Later I'd like to monitor how many of any given entity I have in a scene. Or some other property of those entities.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:

#set value every frame
Performance.set_monitor("jobs_completed",jobs_completed)

#as a callback, like set once in `_ready()` and 
#called by the Performance singleton as needed
Performance.create_monitor("jobs_completed",self,"get_jobs_completed")

I believe the callback version is "better" because it removes ambiguity of what happens when the function is called more than once in a single frame. Does it add? Does it replace? Does it average them? Doesn't matter, it doesn't happen. But I come from a JS background, so the world is callbacks to me.

If this enhancement will not be used often, can it be worked around with a few lines of script?:

This would be a core editor feature and likely cannot be added without modifying the debugger itself.

Is there a reason why this should be core and not an add-on in the asset library?:

I don't think the debugger can be modified this way with the asset library.

@greenfox1505 greenfox1505 changed the title Customer Perfomance Monitors Custom Perfomance Monitors Nov 14, 2019
@Calinou Calinou changed the title Custom Perfomance Monitors Add support for defining custom perfomance monitors May 5, 2020
@akien-mga akien-mga added this to the 4.0 milestone Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants