[MP] Improve network profiler.
Fix RPC profiler and add average RPC size. Improve bandwidth debugger to account for all multiplayer traffic (excluding the lower level peer transformations).
This commit is contained in:
parent
2846ea1ffa
commit
92ed27d8f6
10 changed files with 72 additions and 61 deletions
|
|
@ -99,10 +99,6 @@ void SceneCacheInterface::process_simplify_path(int p_from, const uint8_t *p_pac
|
|||
Ref<MultiplayerPeer> multiplayer_peer = multiplayer->get_multiplayer_peer();
|
||||
ERR_FAIL_COND(multiplayer_peer.is_null());
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
multiplayer->profile_bandwidth("out", packet.size());
|
||||
#endif
|
||||
|
||||
multiplayer_peer->set_transfer_channel(0);
|
||||
multiplayer_peer->set_transfer_mode(MultiplayerPeer::TRANSFER_MODE_RELIABLE);
|
||||
multiplayer->send_command(p_from, packet.ptr(), packet.size());
|
||||
|
|
@ -155,10 +151,6 @@ Error SceneCacheInterface::_send_confirm_path(Node *p_node, NodePath p_path, Pat
|
|||
Ref<MultiplayerPeer> multiplayer_peer = multiplayer->get_multiplayer_peer();
|
||||
ERR_FAIL_COND_V(multiplayer_peer.is_null(), ERR_BUG);
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
multiplayer->profile_bandwidth("out", packet.size() * p_peers.size());
|
||||
#endif
|
||||
|
||||
Error err = OK;
|
||||
for (int peer_id : p_peers) {
|
||||
multiplayer_peer->set_transfer_channel(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue