-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Added Custom Performance Monitor #39302
Conversation
Nice! Like this:
I think the user would be able to organize his monitors much better. Maybe I'd also drop the "_custom" from the method names, there's no need to specify those are "custom" monitors that you're adding/removing. |
I think something like this will work
Adding monitors to built-in categories seems difficult but I think I can do it. However keep in mind that there is no |
Accidently clicked the |
@samdze Went ahead with Capitalized category names. ( |
@simpuid Seems good! I also saw that renaming the methods to |
I also opened this proposal, you may be interested. |
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.
This looks great! Excellent work 🏅 . I'm wondering if we should move the performance drawing functions (setup and parsing) to its own EditorDebuggerPerformance
class. What do you think @simpuid ?
EDIT: That would also help keeping things clean if we implement godotengine/godot-proposals#1014 in the future (which I think it's a good idea).
Yes, we can do that (just like Shouldn't we name it |
Yeah, I agree, both sounds good. |
@Faless I rewrote the parsing and drawing logic to a separate class
|
@samdze Added horizontal guide lines and a vertical marker line that can be placed by clicking LMB. Does text of horizontal guide lines look too cumbersome? |
I am calculating the number of horizontal lines depending on the graph height and text height (So they can be rendered easily)
@Calinou should I limit it to max 5? |
Yes, there's not much benefit to having more than 5. |
…ues of Monitor Custom monitors can be added/removed/checked using `Performance.add_custom_monitor`/`Performance.remove_custom_monitor`/`Performance.has_custom_monitor` The value can be viewed in the `Monitor` tab of Debugger. Text before `/` is used to categorize the custom monitor. `EditorPerformanceProfiler` class is created to separate logic from `ScriptEditorDebugger` User can click on the graph of monitors to read the value at that point. Graph includes intermediate base lines.
Added documentation |
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.
Looking good! Amazing job 🏆 !
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.
Actually, I think you accidentally committed ProjectSetting.xml, could you revert that? Thanks
Sorry! Reverted. |
Thanks! |
Your custom monitors will make a fine addition to our collection. |
Sorry, but is this portable for 3.2 branch? :P |
I don't think so! Callables are not available in 3.2 branch :( |
Not really, the whole debugger was heavily refactored in the master branch, backporting is unlikely. |
Task 1 & 2 of GSoC project
Custom monitors can be added/removed/check using
Performance.add_custom_monitor
/Performance.remove_custom_monitor
/Performance.has_custom_monitor
The value can be viewed in the
Custom
section ofMonitor
tab of Debugger.Basically...
Above code causes
Edit: Monitor list is now cleared when debugging is started.
Edit: Updated with categorized monitors.
Edit: This implements godotengine/godot-proposals#1014 too
Bugsquad edit: This closes godotengine/godot-proposals#229.