You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/11/21 18:04:32 UTC
[GitHub] [beam] TheNeuralBit commented on a diff in pull request #23701: Add record_metrics argument to utils.BatchElements
TheNeuralBit commented on code in PR #23701:
URL: https://github.com/apache/beam/pull/23701#discussion_r1028374978
##########
sdks/python/apache_beam/transforms/util.py:
##########
@@ -349,11 +350,15 @@ def __init__(
ignore_first_n_seen_per_batch_size)
self._batch_size_num_seen = {}
self._replay_last_batch_size = None
+ self._record_metrics = record_metrics
- self._size_distribution = Metrics.distribution(
- 'BatchElements', 'batch_size')
- self._time_distribution = Metrics.distribution(
- 'BatchElements', 'msec_per_batch')
+ if record_metrics:
+ self._size_distribution = Metrics.distribution(
+ 'BatchElements', 'batch_size')
Review Comment:
```suggestion
self._size_distribution = Metrics.distribution(
'BatchElements', 'batch_size')
```
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org