From 968ce9af598024ec71e9ffb2d15c3997a13ad754 Mon Sep 17 00:00:00 2001 From: you Date: Sat, 23 Jun 2018 09:16:01 +0200 Subject: RTT fixes (#7428) * Few code updates * Do not show average RTT before timing out * Fix unwanted integer division in RTTStatistics * Fix float format, prettier jitter calculation * Use +=, 0.1f -> 100.0f for stronger average updates --- src/network/connection.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/network/connection.h') diff --git a/src/network/connection.h b/src/network/connection.h index 2fc344169..f65540c8c 100644 --- a/src/network/connection.h +++ b/src/network/connection.h @@ -593,15 +593,15 @@ class Peer { return m_rtt.jitter_max; case AVG_JITTER: return m_rtt.jitter_avg; + case TIMEOUT_COUNTER: + return m_timeout_counter; } return -1; } protected: virtual void reportRTT(float rtt) {}; - void RTTStatistics(float rtt, - const std::string &profiler_id = "", - unsigned int num_samples = 1000); + void RTTStatistics(float rtt, const std::string &profiler_id = ""); bool IncUseCount(); void DecUseCount(); -- cgit v1.2.3