used to track datarate related metrics for a given connection with respect to time.
More...
#include <ConnectionMetrics.h>
used to track datarate related metrics for a given connection with respect to time.
◆ DatarateMetrics()
AzNetworking::DatarateMetrics::DatarateMetrics |
( |
AZ::TimeMs |
maxSampleTimeMs | ) |
|
|
inline |
Constructor.
- Parameters
-
maxSampleTimeMs | the period of time in milliseconds to attempt to smooth datarate over |
◆ GetBytesPerSecond()
float AzNetworking::DatarateMetrics::GetBytesPerSecond |
( |
| ) |
const |
Retrieve a sample of the datarate being incurred by this connection in bytes per second.
- Returns
- datarate for traffic sent to or from the connection in bytes per second
◆ GetLossRatePercent()
float AzNetworking::DatarateMetrics::GetLossRatePercent |
( |
| ) |
const |
Returns the estimated packet loss rate as a percentage of packets.
- Returns
- the estimated percentage loss rate
◆ LogPacket()
void AzNetworking::DatarateMetrics::LogPacket |
( |
uint32_t |
byteCount, |
|
|
AZ::TimeMs |
currentTimeMs |
|
) |
| |
Invoked whenever traffic is handled by the connection this instance is responsible for.
- Parameters
-
byteCount | number of bytes sent through the connection |
currentTimeMs | current process time in milliseconds |
The documentation for this class was generated from the following files:
- Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/ConnectionMetrics.h
- Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/ConnectionMetrics.inl