From ed0e16b0e8f166209db7c6f5ad52af5bcd2f387c Mon Sep 17 00:00:00 2001 From: mhorky Date: Thu, 25 Jan 2024 14:16:26 +0100 Subject: [PATCH] Update the log message containing response time statistics The current log message includes the floats with 19 decimal points of precision for no good reason. --- src/rhsm/connection.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rhsm/connection.py b/src/rhsm/connection.py index ee02ec279d..fe9c03b4ab 100644 --- a/src/rhsm/connection.py +++ b/src/rhsm/connection.py @@ -1219,7 +1219,9 @@ def _update_smoothed_response_time(self, response_time: float): self.smoothed_rt = response_time else: self.smoothed_rt = (self.ALPHA * self.smoothed_rt) + ((1 - self.ALPHA) * response_time) - log.debug("Response time: %s, Smoothed response time: %s" % (response_time, self.smoothed_rt)) + log.debug( + f"Response time statistics: {response_time:.4f}s (latest), {self.smoothed_rt:.4f}s (smoothed)" + ) def validateResult(self, result: dict, request_type: str = None, handler: str = None) -> None: """