leiyiz commented on a change in pull request #12674:
URL: https://github.com/apache/beam/pull/12674#discussion_r475940875



##########
File path: sdks/python/apache_beam/testing/benchmarks/nexmark/nexmark_util.py
##########
@@ -221,5 +228,34 @@ def unnest_to_json(cand):
 
 
 def millis_to_timestamp(millis):
+  # type: (int) -> Timestamp
   micro_second = millis * 1000
   return Timestamp(micros=micro_second)
+
+
+def get_counter_metric(result, namespace, name):
+  # type: (PipelineResult, str, str) -> int
+  metrics = result.metrics().query(
+      MetricsFilter().with_namespace(namespace).with_name(name))
+  counters = metrics['counters']
+  if len(counters) > 1:
+    raise ValueError(

Review comment:
       thanks!!




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