diff --git a/programs/server/config.xml b/programs/server/config.xml index 833221b279..473cd4a24b 100644 --- a/programs/server/config.xml +++ b/programs/server/config.xml @@ -25,11 +25,6 @@ - - - - - 1 diff --git a/src/Service/ConnectionStats.cpp b/src/Service/ConnectionStats.cpp index 9bbf03eab3..f3b71b0a39 100644 --- a/src/Service/ConnectionStats.cpp +++ b/src/Service/ConnectionStats.cpp @@ -5,7 +5,7 @@ namespace RK uint64_t ConnectionStats::getMinLatency() const { - return min_latency; + return min_latency == std::numeric_limits::max() ? static_cast(0): min_latency; } uint64_t ConnectionStats::getMaxLatency() const @@ -48,7 +48,7 @@ void ConnectionStats::incrementPacketsSent() void ConnectionStats::updateLatency(uint64_t latency_ms) { last_latency = latency_ms; - total_latency += (latency_ms); + total_latency += latency_ms; count++; if (latency_ms < min_latency) @@ -73,8 +73,8 @@ void ConnectionStats::resetLatency() total_latency = 0; count = 0; max_latency = 0; - min_latency = 0; last_latency = 0; + min_latency = std::numeric_limits::max(); } void ConnectionStats::resetRequestCounters() diff --git a/tests/integration/test_four_word_command/test.py b/tests/integration/test_four_word_command/test.py index 07035c0f06..dd279781b8 100644 --- a/tests/integration/test_four_word_command/test.py +++ b/tests/integration/test_four_word_command/test.py @@ -454,7 +454,7 @@ def test_cmd_crst(started_cluster): assert result['lzxid'] == '0xffffffffffffffff' assert result['lresp'] == '0' assert int(result['llat']) == 0 - assert int(result['minlat']) == 18446744073709551615 + assert int(result['minlat']) == 0 assert int(result['avglat']) == 0 assert int(result['maxlat']) == 0