-
Notifications
You must be signed in to change notification settings - Fork 42
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
Frequently asked questions #5
Comments
Perhaps another topic for the FAQ: How to use the Godot profiler for native functions? From what I can see (and also this Q/A), native functions/classes are not automatically visible in the profiler. Since the majority of my business logic runs in Rust, the output of Godot's built-in profiler isn't very useful so far. This example suggests, that on C++ side there is a |
I don't think there is a high-level interface to |
Good point. I guess there are use cases for both. What is nice about the built-in profiler:
I'll try to contribute a minimal integration... |
573: Minimal integration of profiling api r=toasteater a=bluenote10 Following up on godot-rust/book#5, this is a naive way to integrate the profiling API, but it seems to work: ```rust // Usage: godot::nativescript::utils::profiling_add_data("::100::foo", 1000); ``` ![image](https://user-images.githubusercontent.com/3620703/91095098-1318e600-e65c-11ea-9519-b5f30d948802.png) Note: I think the API JSON actually has a small bug: ```json { "name": "godot_nativescript_profiling_add_data", "return_type": "void", "arguments": [ ["const char *", "p_signature"], ["uint64_t", "p_line"] ] } ``` Note that the second argument says `p_line`, but it really is the time in microseconds. I think the name confusion stems from its usage example [here](https://github.com/godotengine/godot-cpp/blob/master/include/core/GodotProfiling.hpp). Co-authored-by: Fabian Keller <github.100.fkeller@spamgourmet.com>
Added an additional Q/A that I missed that would probably be useful. Added profiling FAQ to close godot-rust#5 Also added a fix to have the logging recipe get added to the summary as it was previously missing.
Added an additional Q/A that I missed that would probably be useful. Added profiling FAQ to close godot-rust#5 Also added a fix to have the logging recipe get added to the summary as it was previously missing.
Added an additional Q/A that I missed that would probably be useful. Added profiling FAQ to close godot-rust#5 Also added a fix to have the logging recipe get added to the summary as it was previously missing.
573: Minimal integration of profiling api r=toasteater a=bluenote10 Following up on godot-rust/book#5, this is a naive way to integrate the profiling API, but it seems to work: ```rust // Usage: godot::nativescript::utils::profiling_add_data("::100::foo", 1000); ``` ![image](https://user-images.githubusercontent.com/3620703/91095098-1318e600-e65c-11ea-9519-b5f30d948802.png) Note: I think the API JSON actually has a small bug: ```json { "name": "godot_nativescript_profiling_add_data", "return_type": "void", "arguments": [ ["const char *", "p_signature"], ["uint64_t", "p_line"] ] } ``` Note that the second argument says `p_line`, but it really is the time in microseconds. I think the name confusion stems from its usage example [here](https://github.com/godotengine/godot-cpp/blob/master/include/core/GodotProfiling.hpp). Co-authored-by: Fabian Keller <github.100.fkeller@spamgourmet.com>
Instance
BorrowFailed
,DifferentThread
)...and more?
The text was updated successfully, but these errors were encountered: