summaryrefslogtreecommitdiff
path: root/core/io/multiplayer_api.h
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-02-27 03:30:20 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-03-08 12:36:39 +0100
commitb8ddaf9c33107e01928e04ed462aa08d4017247b (patch)
tree6ab71cdcbfd372e8390baa6ac30a2974fe43d119 /core/io/multiplayer_api.h
parentd0009636df6544dd26ab7c568a0244af6a20634a (diff)
Refactor ScriptDebugger.
EngineDebugger is the new interface to access the debugger. It tries to be as agnostic as possible on the data that various subsystems can expose. It allows 2 types of interactions: - Profilers: A subsystem can register a profiler, assigning it a unique name. That name can be used to activate the profiler or add data to it. The registered profiler can be composed of up to 3 functions: - Toggle: called when the profiler is activated/deactivated. - Add: called whenever data is added to the debugger (via `EngineDebugger::profiler_add_frame_data`) - Tick: called every frame (during idle), receives frame times. - Captures: (Only relevant in remote debugger for now) A subsystem can register a capture, assigning it a unique name. When receiving a message, the remote debugger will check if it starts with `[prefix]:` and call the associated capture with name `prefix`. Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new profiler system. Port SceneDebugger and RemoteDebugger to the new capture system. The LocalDebugger also uses the new profiler system for scripts profiling.
Diffstat (limited to 'core/io/multiplayer_api.h')
-rw-r--r--core/io/multiplayer_api.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/core/io/multiplayer_api.h b/core/io/multiplayer_api.h
index a706a0e450..52f918aefa 100644
--- a/core/io/multiplayer_api.h
+++ b/core/io/multiplayer_api.h
@@ -38,16 +38,6 @@ class MultiplayerAPI : public Reference {
GDCLASS(MultiplayerAPI, Reference);
-public:
- struct ProfilingInfo {
- ObjectID node;
- String node_path;
- int incoming_rpc;
- int incoming_rset;
- int outgoing_rpc;
- int outgoing_rset;
- };
-
private:
//path sent caches
struct PathSentCache {
@@ -65,23 +55,6 @@ private:
Map<int, NodeInfo> nodes;
};
-#ifdef DEBUG_ENABLED
- struct BandwidthFrame {
- uint32_t timestamp;
- int packet_size;
- };
-
- int bandwidth_incoming_pointer;
- Vector<BandwidthFrame> bandwidth_incoming_data;
- int bandwidth_outgoing_pointer;
- Vector<BandwidthFrame> bandwidth_outgoing_data;
- Map<ObjectID, ProfilingInfo> profiler_frame_data;
- bool profiling;
-
- void _init_node_profile(ObjectID p_node);
- int _get_bandwidth_usage(const Vector<BandwidthFrame> &p_buffer, int p_pointer);
-#endif
-
Ref<NetworkedMultiplayerPeer> network_peer;
int rpc_sender_id;
Set<int> connected_peers;
@@ -169,13 +142,6 @@ public:
void set_allow_object_decoding(bool p_enable);
bool is_object_decoding_allowed() const;
- void profiling_start();
- void profiling_end();
-
- int get_profiling_frame(ProfilingInfo *r_info);
- int get_incoming_bandwidth_usage();
- int get_outgoing_bandwidth_usage();
-
MultiplayerAPI();
~MultiplayerAPI();
};