apache_beam.tools.runtime_type_check_microbenchmark module

A microbenchmark for measuring the overhead of runtime_type_check vs performance_runtime_type_check vs a pipeline with no runtime type check.

This runs a sequence of trivial DoFn’s over a set of inputs to simulate a real-world pipeline that processes lots of data.

Run as

python -m apache_beam.tools.runtime_type_check_microbenchmark
class apache_beam.tools.runtime_type_check_microbenchmark.SimpleInput(*unused_args, **unused_kwargs)[source]

Bases: apache_beam.transforms.core.DoFn

process(element, *args, **kwargs)[source]
class apache_beam.tools.runtime_type_check_microbenchmark.SimpleOutput(*unused_args, **unused_kwargs)[source]

Bases: apache_beam.transforms.core.DoFn

process(element, *args, **kwargs)[source]
class apache_beam.tools.runtime_type_check_microbenchmark.NestedInput(*unused_args, **unused_kwargs)[source]

Bases: apache_beam.transforms.core.DoFn

process(element, *args, **kwargs)[source]
class apache_beam.tools.runtime_type_check_microbenchmark.NestedOutput(*unused_args, **unused_kwargs)[source]

Bases: apache_beam.transforms.core.DoFn

process(element, *args, **kwargs)[source]
apache_beam.tools.runtime_type_check_microbenchmark.run_benchmark(num_dofns=100, num_runs=10, num_elements_step=2000, num_for_averaging=4)[source]