Skip to content

Commit

Permalink
Merge pull request #3376 from candlepin/mhorky/connection-rt-logging
Browse files Browse the repository at this point in the history
Update the log message containing response time statistics
  • Loading branch information
ptoscano authored Jan 25, 2024
2 parents b593913 + ed0e16b commit 69eeea1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rhsm/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down

0 comments on commit 69eeea1

Please sign in to comment.