summaryrefslogtreecommitdiff
path: root/scene/debugger/scene_debugger.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/debugger/scene_debugger.h')
-rw-r--r--scene/debugger/scene_debugger.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/scene/debugger/scene_debugger.h b/scene/debugger/scene_debugger.h
index c8298391bb..dd0a17c2dc 100644
--- a/scene/debugger/scene_debugger.h
+++ b/scene/debugger/scene_debugger.h
@@ -32,6 +32,7 @@
#define SCENE_DEBUGGER_H
#include "core/object/class_db.h"
+#include "core/object/ref_counted.h"
#include "core/string/ustring.h"
#include "core/templates/pair.h"
#include "core/variant/array.h"
@@ -41,9 +42,36 @@ class Node;
class SceneDebugger {
public:
+ // RPC profiler
+ struct RPCNodeInfo {
+ ObjectID node;
+ String node_path;
+ int incoming_rpc = 0;
+ int outgoing_rpc = 0;
+ };
+
+ struct RPCProfilerFrame {
+ Vector<RPCNodeInfo> infos;
+
+ Array serialize();
+ bool deserialize(const Array &p_arr);
+ };
+
+private:
+ class RPCProfiler;
+
+ static SceneDebugger *singleton;
+
+ Ref<RPCProfiler> rpc_profiler;
+
+ SceneDebugger();
+
+public:
static void initialize();
static void deinitialize();
+ ~SceneDebugger();
+
#ifdef DEBUG_ENABLED
private:
static void _save_node(ObjectID id, const String &p_path);