Add network profiler tab with network driver data sent/received

This commit is contained in:
Wojciech Figat
2022-11-30 22:05:58 +01:00
parent e4840d35d6
commit 7486bc640f
4 changed files with 100 additions and 0 deletions

View File

@@ -254,6 +254,8 @@ NetworkDriverStats ENetDriver::GetStats(NetworkConnection target)
if (peer)
{
stats.RTT = (float)peer->roundTripTime;
stats.TotalDataSent = peer->totalDataSent;
stats.TotalDataReceived = peer->totalDataReceived;
}
return stats;
}

View File

@@ -16,6 +16,16 @@ API_STRUCT(Namespace="FlaxEngine.Networking") struct FLAXENGINE_API NetworkDrive
/// The mean round trip time (RTT), in milliseconds, between sending a reliable packet and receiving its acknowledgement. Also known as ping time.
/// </summary>
API_FIELD() float RTT = 0.0f;
/// <summary>
/// Total amount of data bytes sent by this client.
/// </summary>
API_FIELD() uint32 TotalDataSent = 0;
/// <summary>
/// Total amount of data bytes received by this client.
/// </summary>
API_FIELD() uint32 TotalDataReceived = 0;
};
template<>