Add a method CNetMessage::GetMemoryUsage
and use this for accounting of the size of the process receive queue instead of the raw message size (like we already do for the send buffer and CSerializedNetMsg
).
This ensures that allocation and deserialization overhead is better taken into account.
On average, this counts about ~100 extra bytes per packet on x86_64:
02024-10-27T09:50:12Z [net] 24 bytes -> 112 bytes
12024-10-27T10:36:37Z [net] 61 bytes -> 176 bytes
22024-10-27T10:36:38Z [net] 1285 bytes -> 1392 bytes
32024-10-27T09:50:21Z [net] 43057 bytes -> 43168 bytes