Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4c28f05

Browse files
committed
Add internal comments to metrics
1 parent 463f1ee commit 4c28f05

5 files changed

Lines changed: 11 additions & 4 deletions

File tree

sdks/python/apache_beam/metrics/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@
1515
# limitations under the License.
1616
#
1717
from apache_beam.metrics.metric import Metrics
18+
from apache_beam.metrics.metric import MetricsFilter

sdks/python/apache_beam/metrics/cells.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
from apache_beam.metrics.metricbase import Counter
3030
from apache_beam.metrics.metricbase import Distribution
3131

32+
__all__ = ['DistributionResult']
33+
3234

3335
class CellCommitState(object):
3436
"""For internal use only; no backwards-compatibility guarantees.

sdks/python/apache_beam/metrics/execution.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
2525
- MetricKey - Internal key for a metric.
2626
- MetricResult - Current status of a metric's updates/commits.
27-
- MetricsEnvironment - Keeps track of MetricsContainer and other metrics
27+
- _MetricsEnvironment - Keeps track of MetricsContainer and other metrics
2828
information for every single execution working thread.
2929
- MetricsContainer - Holds the metrics of a single step and a single
3030
unit-of-commit (bundle).
@@ -36,9 +36,7 @@
3636

3737

3838
class MetricKey(object):
39-
"""
40-
41-
Key used to identify instance of metric cell.
39+
"""Key used to identify instance of metric cell.
4240
4341
Metrics are internally keyed by the step name they associated with and
4442
the name of the metric.

sdks/python/apache_beam/metrics/metric.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
from apache_beam.metrics.metricbase import Counter, Distribution
3131
from apache_beam.metrics.metricbase import MetricName
3232

33+
__all__ = ['Metrics', 'MetricsFilter']
34+
3335

3436
class Metrics(object):
3537
"""Lets users create/access metric objects during pipeline execution."""
@@ -146,6 +148,8 @@ def query(self, filter=None):
146148
class MetricsFilter(object):
147149
"""Simple object to filter metrics results.
148150
151+
This class is experimental. No backwards-compatibility guarantees.
152+
149153
If filters by matching a result's step-namespace-name with three internal
150154
sets. No execution/matching logic is added to this object, so that it may
151155
be used to construct arguments as an RPC request. It is left for runners

sdks/python/apache_beam/metrics/metricbase.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
- MetricName - Namespace and name used to refer to a Metric.
3131
"""
3232

33+
__all__ = ['Metric', 'Counter', 'Distribution', 'MetricName']
34+
3335

3436
class MetricName(object):
3537
"""The name of a metric.

0 commit comments

Comments
 (0)