piotr-szuberski commented on a change in pull request #11661:
URL: https://github.com/apache/beam/pull/11661#discussion_r431142517



##########
File path: sdks/python/apache_beam/examples/wordcount_it_test.py
##########
@@ -104,18 +107,33 @@ def _run_wordcount_it(self, run_wordcount, **opts):
     run_time = end_time - start_time
 
     if publish_to_bq:
-      bq_publisher = BigQueryMetricsPublisher(
-          project_name=test_pipeline.get_option('project'),
-          table=test_pipeline.get_option('metrics_table'),
-          dataset=test_pipeline.get_option('metrics_dataset'),
-      )
-      result = Metric(
-          submit_timestamp=time.time(),
-          metric_id=uuid.uuid4().hex,
-          value=run_time,
-          label='Python performance test',
-      )
-      bq_publisher.publish([result.as_dict()])
+      self._publish_metrics(test_pipeline, run_time)
+
+  def _publish_metrics(self, pipeline, metric_value):

Review comment:
       I think that's a very good idea.




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