[ 
https://issues.apache.org/jira/browse/BEAM-6175?focusedWorklogId=211617&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-211617
 ]

ASF GitHub Bot logged work on BEAM-6175:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Mar/19 10:00
            Start Date: 12/Mar/19 10:00
    Worklog Time Spent: 10m 
      Work Description: DariuszAniszewski commented on pull request #7965: 
[BEAM-6175] Extract reader and publisher from MetricsMonitor in Python load 
tests
URL: https://github.com/apache/beam/pull/7965#discussion_r264320986
 
 

 ##########
 File path: sdks/python/apache_beam/testing/load_tests/co_group_by_key_test.py
 ##########
 @@ -130,22 +130,16 @@ def setUp(self):
         self.pipeline.get_option('co_input_options'))
 
     self.metrics_monitor = self.pipeline.get_option('publish_to_big_query')
-    metrics_project_id = self.pipeline.get_option('project')
     self.metrics_namespace = self.pipeline.get_option('metrics_table')
-    metrics_dataset = self.pipeline.get_option('metrics_dataset')
-    check = metrics_project_id and self.metrics_namespace and metrics_dataset\
-            is not None
-    if not self.metrics_monitor:
+
+    if not self.metrics_monitor or str(self.metrics_monitor) != 'true':
 
 Review comment:
   is `str()` required? If I understand it properly, this value comes from 
pipelineoptions, so it's string by default?
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 211617)
    Time Spent: 1h 10m  (was: 1h)

> Extract reader and publisher from MetricsMonitor in Python Load Test utils
> --------------------------------------------------------------------------
>
>                 Key: BEAM-6175
>                 URL: https://issues.apache.org/jira/browse/BEAM-6175
>             Project: Beam
>          Issue Type: Improvement
>          Components: testing
>            Reporter: Kasia Kucharczyk
>            Assignee: Kasia Kucharczyk
>            Priority: Minor
>              Labels: triaged
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> For load tests metrics (load_test_utils.py) flexibility purposes, two classes 
> should be extracted from MetricsMonitor class:
> * MetricsReader - will only query the metrics by specific names/namespaces 
> and return a Map of keys and metric values for a namespace
> * MetricsPublisher - as a set of "Publishers". Each publisher then could 
> publish() to separate medium (BigQueryClient/console/others)
> This would make it even easier to extend this code in the future.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to