emkornfield commented on a change in pull request #12070:
URL: https://github.com/apache/beam/pull/12070#discussion_r444641099



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryStorageStreamSource.java
##########
@@ -247,8 +267,19 @@ private synchronized boolean readNextRecord() throws 
IOException {
             fractionConsumedFromPreviousResponse);
       }
 
-      record = datumReader.read(record, decoder);
-      current = parseFn.apply(new SchemaAndRecord(record, tableSchema));
+      Stopwatch stopwatch = Stopwatch.createStarted();
+      try {
+        record = datumReader.read(record, decoder);
+      } finally {
+        decoderTotalLatencyMs.inc(stopwatch.elapsed(TimeUnit.MILLISECONDS));
+      }
+
+      stopwatch.reset();

Review comment:
       I think you might need to resetart the stopwatch here: 
https://guava.dev/releases/19.0/api/docs/com/google/common/base/Stopwatch.html#reset()




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to