ajamato commented on a change in pull request #15420:
URL: https://github.com/apache/beam/pull/15420#discussion_r698705236



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java
##########
@@ -898,6 +896,7 @@ public void deleteDataset(String projectId, String 
datasetId)
                           
BackOffAdapter.toGcpBackOff(rateLimitBackoffFactory.backoff());
                       long totalBackoffMillis = 0L;
                       while (true) {
+                        ServiceCallMetric serviceCallMetric = 
BigQueryUtils.writeCallMetric(ref);

Review comment:
       Well this is actually designed to have the ability to add a latency 
metric. So we instantiate one for each call, and get a new start time each time 
one is instantiated.
   
   There could be some tiny savings by reusing the object and resetting the 
start time across calls
   But I don't think its worth adding at this stage because the long operations 
are still there, and the savings would be small.
   
   In this case long operation is the RPC and second to that is the system call 
to get the start time. Both of this would still be there if we reused the 
object. The only savings would be to to not populate the label map twice




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to