AnandInguva commented on code in PR #23371:
URL: https://github.com/apache/beam/pull/23371#discussion_r980423505


##########
sdks/python/apache_beam/testing/load_tests/load_test_metrics_utils.py:
##########
@@ -151,7 +151,7 @@ def get_all_distributions_by_type(dist, metric_id):
     list of :class:`DistributionMetric` objects
   """
   submit_timestamp = time.time()
-  dist_types = ['count', 'max', 'min', 'sum']
+  dist_types = ['count', 'max', 'min', 'sum', 'mean']

Review Comment:
   Yep. I went through that PR. I use the `LoadTest`  which has helper 
functions coded already to publish the metrics to the InfluxDB. 
   
   I added `mean` because `DistributionResult` has mean() method and to avoid 
redundant calculation mean with sum/count
   
   
https://github.com/apache/beam/blob/3a4d57eb8976c5f503b32d478a80b1800490f66f/sdks/python/apache_beam/metrics/cells.py#L270



##########
sdks/python/apache_beam/testing/load_tests/load_test_metrics_utils.py:
##########
@@ -151,7 +151,7 @@ def get_all_distributions_by_type(dist, metric_id):
     list of :class:`DistributionMetric` objects
   """
   submit_timestamp = time.time()
-  dist_types = ['count', 'max', 'min', 'sum']
+  dist_types = ['count', 'max', 'min', 'sum', 'mean']

Review Comment:
   Yep. I went through that PR. I use the `LoadTest`  which has helper 
functions coded already to publish the metrics to the InfluxDB. 
   
   I added `mean` because `DistributionResult` has mean() method and to avoid 
redundant calculation of mean with sum/count
   
   
https://github.com/apache/beam/blob/3a4d57eb8976c5f503b32d478a80b1800490f66f/sdks/python/apache_beam/metrics/cells.py#L270



-- 
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: [email protected]

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

Reply via email to