void onRetransmission(NetworkMetrics &metrics)
Counts a retransmitted datagram.
Definition Metrics.cpp:52
void updateRttMetrics(NetworkMetrics &metrics, float newRtt)
Adds a round trip time sample and updates smoothing and jitter.
Definition Metrics.cpp:7
void onPacketSend(NetworkMetrics &metrics, std::size_t packetSize)
Counts a sent datagram.
Definition Metrics.cpp:36
void onPacketReceived(NetworkMetrics &metrics, std::size_t packetSize)
Counts a received datagram.
Definition Metrics.cpp:41
void onPacketDuplicated(NetworkMetrics &metrics)
Counts a duplicated datagram.
Definition Metrics.cpp:46
void updatePacketMetrics(NetworkMetrics &metrics)
Recomputes the packet loss percentage.
Definition Metrics.cpp:24
void onPacketOut(NetworkMetrics &metrics)
Counts a datagram received out of order.
Definition Metrics.cpp:50
Traffic and latency counters of a network endpoint.
Definition Metrics.hpp:14
uint32_t retransmissions
Number of resent packets.
Definition Metrics.hpp:21
uint64_t packetsDuplicated
Datagrams received twice.
Definition Metrics.hpp:29
uint64_t packetsLost
Datagrams known to be lost.
Definition Metrics.hpp:28
float previousRtt
Round trip time sample before the last one.
Definition Metrics.hpp:17
uint64_t bytesReceived
Total bytes received.
Definition Metrics.hpp:24
float jitter
Definition Metrics.hpp:18
uint64_t packetsReceived
Total datagrams received.
Definition Metrics.hpp:27
uint64_t packetsSent
Total datagrams sent.
Definition Metrics.hpp:26
float rtt
Last round trip time sample.
Definition Metrics.hpp:15
float packetLossPercentage
Lost packets over all packets, in percent.
Definition Metrics.hpp:20
float smoothRtt
Exponentially smoothed round trip time.
Definition Metrics.hpp:16
uint64_t bytesSent
Total bytes sent.
Definition Metrics.hpp:23
uint64_t packetsOut
Datagrams received out of order.
Definition Metrics.hpp:30