From 600ef0b8d4db4d5712f038f8b1b4c34714975eeb Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 23 Feb 2024 15:27:40 -0800 Subject: [PATCH] renamed variable --- google/cloud/bigtable/data/_metrics/data_model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google/cloud/bigtable/data/_metrics/data_model.py b/google/cloud/bigtable/data/_metrics/data_model.py index 266e1c7d2..4699ef20f 100644 --- a/google/cloud/bigtable/data/_metrics/data_model.py +++ b/google/cloud/bigtable/data/_metrics/data_model.py @@ -296,7 +296,7 @@ def end_attempt_with_status(self, status: StatusCode | Exception) -> None: ) if isinstance(status, Exception): status = self._exc_to_status(status) - new_attempt = CompletedAttemptMetric( + complete_attempt = CompletedAttemptMetric( first_response_latency_ns=self.active_attempt.first_response_latency_ns, duration_ns=time.monotonic_ns() - self.active_attempt.start_time_ns, end_status=status, @@ -305,10 +305,10 @@ def end_attempt_with_status(self, status: StatusCode | Exception) -> None: backoff_before_attempt_ns=self.active_attempt.backoff_before_attempt_ns, grpc_throttling_time_ns=self.active_attempt.grpc_throttling_time_ns, ) - self.completed_attempts.append(new_attempt) + self.completed_attempts.append(complete_attempt) self.active_attempt = None for handler in self.handlers: - handler.on_attempt_complete(new_attempt, self) + handler.on_attempt_complete(complete_attempt, self) def end_with_status(self, status: StatusCode | Exception) -> None: """