Statistics |
How to read and interpret RakNet's statistical data
RakPeerInterface provides the structure RakNetStatistics which is returned by the GetStatistics() function present in RakPeerInterface. This structure is defined in Source/RakNetStatistics.h. The function StatisticsToString is also provided which will convert these statistics to a formatted buffer. A running total is kept for the following enumerations /// How many bytes per pushed via a call to RakPeerInterface::Send() /// How many user message bytes were sent via a call to RakPeerInterface::Send(). This is less than or equal to USER_MESSAGE_BYTES_PUSHED. /// How many user message bytes were resent. A message is resent if it is marked as reliable, and either the message didn't arrive or the message ack didn't arrive. /// How many user message bytes were received, and returned to the user successfully. /// How many user message bytes were received, but ignored due to data format errors. This will usually be 0. /// How many actual bytes were sent, including per-message and per-datagram overhead, and reliable message acks /// How many actual bytes were received, including overead and acks. If you want to track statistics over time, we also provide Source/StatisticsHistoryPlugin.h, used by the sample StatisticsHistoryTest. It tracks values for some user-defined amount of time and does various calculations on the data set. RakPeerInterface::GetStatistics() is read automatically. Here is sample code that tracks a sin and cos wave. DataStructures::Queue<StatisticsHistory::TimeAndValue> histogram; |
See Also |
Index |