diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2019-09-05 16:34:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-05 16:34:36 +0200 |
commit | 768d637a1bc94a0a6a9b4ea2eb50e2c8197be3ab (patch) | |
tree | 98a1a70f28e15fd7ae9b71d273267ded905a2542 /core/script_debugger_remote.h | |
parent | 8bcf6ca95317329242e954a71047ce1183cfe5f8 (diff) | |
parent | 8244f535cd2a610f40bb22894ac87d08c48a0601 (diff) | |
download | redot-engine-768d637a1bc94a0a6a9b4ea2eb50e2c8197be3ab.tar.gz |
Merge pull request #31870 from JFonS/add_network_profiler
Add network profiler
Diffstat (limited to 'core/script_debugger_remote.h')
-rw-r--r-- | core/script_debugger_remote.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/script_debugger_remote.h b/core/script_debugger_remote.h index 34585afc80..b6dd925181 100644 --- a/core/script_debugger_remote.h +++ b/core/script_debugger_remote.h @@ -54,11 +54,13 @@ class ScriptDebuggerRemote : public ScriptDebugger { Vector<ScriptLanguage::ProfilingInfo> profile_info; Vector<ScriptLanguage::ProfilingInfo *> profile_info_ptrs; + Vector<MultiplayerAPI::ProfilingInfo> network_profile_info; Map<StringName, int> profiler_function_signature_map; float frame_time, idle_time, physics_time, physics_frame_time; bool profiling; + bool profiling_network; int max_frame_functions; bool skip_profile_frame; bool reload_all_scripts; @@ -67,6 +69,8 @@ class ScriptDebuggerRemote : public ScriptDebugger { Ref<PacketPeerStream> packet_peer_stream; uint64_t last_perf_time; + uint64_t last_net_prof_time; + uint64_t last_net_bandwidth_time; Object *performance; bool requested_quit; Mutex *mutex; @@ -123,10 +127,14 @@ class ScriptDebuggerRemote : public ScriptDebugger { void _send_video_memory(); LiveEditFuncs *live_edit_funcs; + Ref<MultiplayerAPI> multiplayer; + ErrorHandlerList eh; static void _err_handler(void *, const char *, const char *, int p_line, const char *, const char *, ErrorHandlerType p_type); void _send_profiling_data(bool p_for_frame); + void _send_network_profiling_data(); + void _send_network_bandwidth_usage(); struct FrameData { @@ -170,6 +178,7 @@ public: virtual void set_request_scene_tree_message_func(RequestSceneTreeMessageFunc p_func, void *p_udata); virtual void set_live_edit_funcs(LiveEditFuncs *p_funcs); + virtual void set_multiplayer(Ref<MultiplayerAPI> p_multiplayer); virtual bool is_profiling() const; virtual void add_profiling_frame_data(const StringName &p_name, const Array &p_data); |