1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

[Debugger] Move most profilers to ServersDebugger.

Also splits bandwidth/rpc profiler (RPCProfiler is now in
SceneDebugger).
This commit is contained in:
Fabio Alessandrelli
2022-02-06 02:29:08 +01:00
parent 789e648f4d
commit 87f4bbd668
19 changed files with 780 additions and 644 deletions

View File

@@ -46,12 +46,11 @@ void SceneRPCInterface::make_default() {
#ifdef DEBUG_ENABLED
_FORCE_INLINE_ void SceneRPCInterface::_profile_node_data(const String &p_what, ObjectID p_id) {
if (EngineDebugger::is_profiling("multiplayer")) {
if (EngineDebugger::is_profiling("rpc")) {
Array values;
values.push_back("node");
values.push_back(p_id);
values.push_back(p_what);
EngineDebugger::profiler_add_frame_data("multiplayer", values);
EngineDebugger::profiler_add_frame_data("rpc", values);
}
}
#else
@@ -268,7 +267,7 @@ void SceneRPCInterface::_process_rpc(Node *p_node, const uint16_t p_rpc_method_i
argp.resize(argc);
#ifdef DEBUG_ENABLED
_profile_node_data("in_rpc", p_node->get_instance_id());
_profile_node_data("rpc_in", p_node->get_instance_id());
#endif
int out;
@@ -471,7 +470,7 @@ void SceneRPCInterface::rpcp(Object *p_obj, int p_peer_id, const StringName &p_m
if (p_peer_id != node_id) {
#ifdef DEBUG_ENABLED
_profile_node_data("out_rpc", node->get_instance_id());
_profile_node_data("rpc_out", node->get_instance_id());
#endif
_send_rpc(node, p_peer_id, rpc_id, config, p_method, p_arg, p_argcount);