apache_beam.metrics.cells module

This file contains metric cell classes. A metric cell is used to accumulate in-memory changes to a metric. It represents a specific metric in a single context.

class apache_beam.metrics.cells.MetricCell[source]

Bases: object

For internal use only; no backwards-compatibility guarantees.

Accumulates in-memory changes to a metric.

A MetricCell represents a specific metric in a single context and bundle. All subclasses must be thread safe, as these are used in the pipeline runners, and may be subject to parallel/concurrent updates. Cells should only be used directly within a runner.

update(value)[source]
get_cumulative()[source]
to_runner_api_monitoring_info(name, transform_id)[source]
reset()[source]
class apache_beam.metrics.cells.MetricCellFactory[source]

Bases: object

class apache_beam.metrics.cells.DistributionResult(data)[source]

Bases: object

The result of a Distribution metric.

max
min
count
sum
mean

Returns the float mean of the distribution.

If the distribution contains no elements, it returns None.

class apache_beam.metrics.cells.GaugeResult(data)[source]

Bases: object

value
timestamp
class apache_beam.metrics.cells.MetricAggregator[source]

Bases: object

For internal use only; no backwards-compatibility guarantees.

Base interface for aggregating metric data during pipeline execution.

identity_element()[source]

Returns the identical element of an Aggregation.

For the identity element, it must hold that
Aggregator.combine(any_element, identity_element) == any_element.
combine(x, y)[source]
result(x)[source]